We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d5c1d79 commit 9bdb33aCopy full SHA for 9bdb33a
1 file changed
gcp/workers/worker/worker.py
@@ -695,9 +695,12 @@ def xact():
695
# Update the bug entity based on the comparison.
696
if has_changed:
697
ds_vuln.modified = osv.utcnow()
698
- else:
+ elif ds_vuln.modified:
699
# If no meaningful change, ensure last_modified reflects the source
700
- # file's modified date, as only metadata might have changed.
+ # file's modified date or the date in the database, whichever is later.
701
+ ds_vuln.modified = max(ds_vuln.modified, orig_modified_date)
702
+ else:
703
+ # New record, so set it to the upstream records modified date.
704
ds_vuln.modified = orig_modified_date
705
706
# Overwrite aliases / upstream from computation
0 commit comments