fix: save timestamp

This commit is contained in:
moanos [he/him] 2024-11-07 21:58:12 +01:00
parent 573630f9ee
commit 50c1a4f2c6

View File

@ -9,6 +9,7 @@ def set_timestamp(key: str):
try: try:
ts = Timestamp.objects.get(key=key) ts = Timestamp.objects.get(key=key)
ts.timestamp = timezone.now() ts.timestamp = timezone.now()
ts.save()
except Timestamp.DoesNotExist: except Timestamp.DoesNotExist:
Timestamp.objects.create(key=key, timestamp=timezone.now()) Timestamp.objects.create(key=key, timestamp=timezone.now())