202 Geometry conflict checking to background
* wraps check_for_conflicts() in celery based method * fixes bug on InterventionEditForm where geometry's save() has been called twice
This commit is contained in:
@@ -14,6 +14,7 @@ from django.utils import timezone
|
||||
|
||||
from konova.models import BaseResource, UuidModel
|
||||
from konova.sub_settings.lanis_settings import DEFAULT_SRID_RLP
|
||||
from konova.tasks import celery_check_for_geometry_conflicts
|
||||
from konova.utils.wfs.spatial import ParcelWFSFetcher
|
||||
|
||||
|
||||
@@ -28,7 +29,7 @@ class Geometry(BaseResource):
|
||||
|
||||
def save(self, *args, **kwargs):
|
||||
super().save(*args, **kwargs)
|
||||
self.check_for_conflicts()
|
||||
celery_check_for_geometry_conflicts.delay(self.id)
|
||||
|
||||
def check_for_conflicts(self):
|
||||
""" Checks for new geometry overlaps
|
||||
|
||||
Reference in New Issue
Block a user