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

Suspicious operation fix #475

Merged
merged 1 commit into from
Dec 14, 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
2 changes: 1 addition & 1 deletion competition/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -736,7 +736,7 @@ class Meta:
event = models.ForeignKey(Event, null=True, on_delete=models.SET_NULL)

file = RestrictedFileField(
upload_to='publications/%Y',
upload_to='publications/%Y/',
content_types=['application/pdf', 'application/zip'],
verbose_name='súbor')

Expand Down
5 changes: 5 additions & 0 deletions competition/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,11 @@ class Meta:
model = models.Publication
fields = '__all__'

def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)

self.fields['file'].parent = None

def get_verbose_name(self, obj):
return str(obj)

Expand Down
Loading