-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
🐛 Add migration generation distance to source #188
🐛 Add migration generation distance to source #188
Conversation
89ccc43
to
c212390
Compare
Codecov Report
@@ Coverage Diff @@
## master #188 +/- ##
=======================================
Coverage 98.59% 98.59%
=======================================
Files 156 156
Lines 5254 5254
=======================================
Hits 5180 5180
Misses 74 74 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
for instance in model.objects.all(): | ||
if instance._meta.model_name in ['morphology', 'status']: | ||
stream = annotate_distance_to_source(Stream.objects.all(), instance).get( | ||
pk=instance.topology.stream.pk) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pk=instance.topology.stream.pk) | |
pk=instance.topology.stream_id) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
defaults={"distance": stream.locate.m} | ||
) | ||
else: | ||
qs = Stream.objects.none() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
qs = Stream.objects.none() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
else: | ||
qs = Stream.objects.none() | ||
if not instance.geom: | ||
return qs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return qs | |
return Stream.objects.none() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
c212390
to
f585203
Compare
No description provided.