Skip to content

Commit

Permalink
Merge pull request #591 from jbernal0019/master
Browse files Browse the repository at this point in the history
Remove constraint that prevented forward slashes in a feed's name
  • Loading branch information
jbernal0019 authored Nov 1, 2024
2 parents 5e031a4 + b611026 commit 2912c32
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 19 deletions.
9 changes: 0 additions & 9 deletions chris_backend/feeds/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,15 +138,6 @@ def update(self, instance, validated_data):
instance.folder.create_public_link()
return super(FeedSerializer, self).update(instance, validated_data)

def validate_name(self, name):
"""
Overriden to check that the feed's name does not contain forward slashes.
"""
if '/' in name:
raise serializers.ValidationError(
["This field may not contain forward slashes."])
return name

def validate_public(self, public):
"""
Overriden to check that only the owner or superuser chris can change a feed's
Expand Down
10 changes: 0 additions & 10 deletions chris_backend/feeds/tests/test_serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,16 +139,6 @@ def setUp(self):
feed = Feed.objects.get(name=self.feedname)
self.feed_serializer = FeedSerializer(feed)

def test_validate_name(self):
"""
Test whether overriden validate_name method raises a serializers.ValidationError
when the feed name contains forward slashes.
"""
with self.assertRaises(serializers.ValidationError):
self.feed_serializer.validate_name('myfeed/')
name = self.feed_serializer.validate_name('myfeed')
self.assertEqual(name, 'myfeed')

def test_get_started_jobs(self):
"""
Test whether overriden get_created_jobs method returns the correct number of
Expand Down

0 comments on commit 2912c32

Please sign in to comment.