Skip to content

Commit

Permalink
Suspicious operation fix (#475)
Browse files Browse the repository at this point in the history
  • Loading branch information
mmihalik authored Dec 14, 2024
1 parent 2bedab3 commit 4c96ee1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
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 @@ -46,6 +46,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

0 comments on commit 4c96ee1

Please sign in to comment.