mirror of
https://github.com/pretix/pretix.git
synced 2026-05-05 15:14:04 +00:00
Fixed bug in last commit
This commit is contained in:
@@ -67,11 +67,7 @@ class SettingsForm(forms.Form):
|
||||
)
|
||||
else:
|
||||
fname = '%s/%s.%s' % (self.obj.slug, name, value.name.split('.')[-1])
|
||||
if not os.path.exists(os.path.dirname(fname)):
|
||||
os.makedirs(os.path.dirname(fname))
|
||||
with default_storage.open(fname, 'wb+') as destination:
|
||||
for chunk in value.chunks():
|
||||
destination.write(chunk)
|
||||
default_storage.save(fname, value)
|
||||
value._name = fname
|
||||
elif isinstance(value, File):
|
||||
# file is unchanged
|
||||
|
||||
Reference in New Issue
Block a user