Skip to content

Commit

Permalink
fix: webpath serializer
Browse files Browse the repository at this point in the history
  • Loading branch information
francesco-filicetti committed May 5, 2021
1 parent d39b7a0 commit bdcedee
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 12 deletions.
3 changes: 3 additions & 0 deletions example/unicms/settingslocal.py
Original file line number Diff line number Diff line change
Expand Up @@ -357,3 +357,6 @@
}

SEARCH_ELEMENTS_IN_PAGE = 4

FILETYPE_IMAGE_YX_RATIO_MIN = 0.25
FILETYPE_IMAGE_YX_RATIO_MAX = 2
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def get_requirements(fname='requirements.txt'):

setup(
name="unicms",
version='0.12.2',
version='0.12.3',
description="uniCMS is a Django Web Content Management System",
author='Giuseppe De Marco, Francesco Filicetti',
author_email='giuseppe.demarco@unical.it, francesco.filicetti@unical.it',
Expand Down
22 changes: 11 additions & 11 deletions src/cms/contexts/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,17 +91,17 @@ def validate_path(self, value):
"""
return slugify(value)

def create(self, validated_data):
try:
return WebPath.objects.create(**validated_data)
except Exception as e:
raise e

def update(self, instance, validated_data):
try:
return super().update(instance, validated_data)
except Exception as e:
raise e
# def create(self, validated_data):
# try:
# return WebPath.objects.create(**validated_data)
# except Exception as e:
# raise e

# def update(self, instance, validated_data):
# try:
# return super().update(instance, validated_data)
# except Exception as e:
# raise e


class WebPathSelectOptionsSerializer(serializers.ModelSerializer):
Expand Down

0 comments on commit bdcedee

Please sign in to comment.