Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove constraint that prevented forward slashes in a feed's name #591

Merged
merged 1 commit into from
Nov 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading