Skip to content
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

Merged
merged 1 commit into from
Jul 19, 2023

Conversation

LePetitTim
Copy link
Contributor

No description provided.

@LePetitTim LePetitTim force-pushed the bug_add_migration_generation_distancetosource branch from 89ccc43 to c212390 Compare July 17, 2023 10:33
@codecov
Copy link

codecov bot commented Jul 17, 2023

Codecov Report

Merging #188 (f585203) into master (c2def4e) will not change coverage.
The diff coverage is n/a.

@@           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)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
pk=instance.topology.stream.pk)
pk=instance.topology.stream_id)

Copy link
Contributor Author

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()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
qs = Stream.objects.none()

Copy link
Contributor Author

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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
return qs
return Stream.objects.none()

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@LePetitTim LePetitTim force-pushed the bug_add_migration_generation_distancetosource branch from c212390 to f585203 Compare July 18, 2023 12:36
@LePetitTim LePetitTim merged commit 6eaf5a4 into master Jul 19, 2023
8 checks passed
@LePetitTim LePetitTim deleted the bug_add_migration_generation_distancetosource branch July 19, 2023 07:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants