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()