Skip to content

Commit

Permalink
Clean django code
Browse files Browse the repository at this point in the history
  • Loading branch information
fpsampayo committed Mar 26, 2024
1 parent 83e9c2e commit 7604a83
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
7 changes: 2 additions & 5 deletions django_project/geosight/data/models/context_layer.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,8 @@ class ContextLayer(AbstractEditData, AbstractTerm):
blank=True,
max_length=10240,
help_text=(
"Put full url with parameters that are needed. Not necesary for Related Table Layer Type."
'Put full url with parameters that are needed. '
'Not necesary for Related Table Layer Type.'
)
)
layer_type = models.CharField(
Expand Down Expand Up @@ -168,10 +169,6 @@ class ContextLayer(AbstractEditData, AbstractTerm):
objects = models.Manager()
permissions = PermissionManager()

def clean(self):
if self.layer_type != LayerType.RELATED_TABLE and self.url is None:
raise ValidationError('Url is mandatory for non related table layer type.')

def save_relations(self, data):
"""Save all relationship data."""
self.contextlayerfield_set.all().delete()
Expand Down
1 change: 0 additions & 1 deletion django_project/geosight/data/serializer/context_layer.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
from rest_framework import serializers

from core.serializer.dynamic_serializer import DynamicModelSerializer
from geosight.data.models import RelatedTableRow
from geosight.data.models.context_layer import (
ContextLayer, ContextLayerField
)
Expand Down

0 comments on commit 7604a83

Please sign in to comment.