From 4da3d055417f1258b3d1bec2dcb3f540955eb1bd Mon Sep 17 00:00:00 2001 From: Enric Pou Date: Fri, 21 Nov 2025 16:03:53 +0100 Subject: [PATCH] Fix: Update last_location --- tigaserver_app/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tigaserver_app/models.py b/tigaserver_app/models.py index a6665465..35a87fee 100644 --- a/tigaserver_app/models.py +++ b/tigaserver_app/models.py @@ -1960,7 +1960,7 @@ def save(self, *args, **kwargs): if _old_point != self.point: _last_location_update = self.user.last_location_update _report_upload_time = self.server_upload_time or timezone.now() - if _last_location_update and _report_upload_time >= _last_location_update: + if _last_location_update is None or (_last_location_update and _report_upload_time >= _last_location_update): self.user.last_location = self.point self.user.last_location_update = _report_upload_time self.user.save()