feat: Use celery for location queries

This commit is contained in:
2024-10-10 07:39:44 +02:00
parent 39893c2185
commit 28331f105a
6 changed files with 32 additions and 9 deletions

View File

@@ -134,6 +134,12 @@ class Location(models.Model):
)
return location
@staticmethod
def add_location_to_object(instance):
"""Search the location given in the location string and add it to the object"""
location = Location.get_location_from_string(instance.location_string)
instance.location = location
instance.save()
class RescueOrganization(models.Model):
def __str__(self):