fix: save timestamp
This commit is contained in:
parent
573630f9ee
commit
50c1a4f2c6
@ -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())
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user