projects
/
pgeu-system.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fd34e1d
)
Don't crash when both removing and uploading PDF at the same time
author
Magnus Hagander
<magnus@hagander.net>
Tue, 5 Nov 2024 10:23:07 +0000
(11:23 +0100)
committer
Magnus Hagander
<magnus@hagander.net>
Tue, 5 Nov 2024 10:23:07 +0000
(11:23 +0100)
Noted by Karen Jex
postgresqleu/util/widgets.py
patch
|
blob
|
blame
|
history
diff --git
a/postgresqleu/util/widgets.py
b/postgresqleu/util/widgets.py
index 9af60ebc7b4401a1873c980657d8d60dd495abcb..4fbc637a7a5efdb95208264393ec9c2e624dd836 100644
(file)
--- a/
postgresqleu/util/widgets.py
+++ b/
postgresqleu/util/widgets.py
@@
-102,7
+102,7
@@
class InlinePdfUploadWidget(forms.ClearableFileInput):
def render(self, name, value, attrs=None, renderer=None):
context = self.get_context(name, value, attrs)
- if value and not isinstance(value, UploadedFile):
+ if value and not isinstance(value, UploadedFile)
and type(value) != object
:
context['widget']['value'] = base64.b64encode(value).decode('ascii')
return mark_safe(loader.render_to_string('confreg/widgets/inline_pdf_upload_widget.html', context))