We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1500b24 commit 901d054Copy full SHA for 901d054
ami/main/models.py
@@ -1167,9 +1167,13 @@ def deployment_events_need_update(deployment: Deployment) -> bool:
1167
1168
ungrouped_images = models.Q(event__isnull=True)
1169
1170
- events_last_updated = deployment.events.aggregate(
1171
- latest_updated_at=models.Max("updated_at"),
1172
- )["latest_updated_at"]
+ events_last_updated = (
+ deployment.events.aggregate(
+ latest_updated_at=models.Max("updated_at"),
1173
+ )["latest_updated_at"]
1174
+ or deployment.updated_at
1175
+ or datetime.datetime.min
1176
+ )
1177
images_updated_after_events = models.Q(timestamp__gt=events_last_updated)
1178
1179
new_or_ungrouped_images = (
0 commit comments