projects
/
oweals
/
karmaworld.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
cf1ae63
)
Only overwrite the name of a newly uploaded file iff the user actualy entered a name...
author
Charles Holbrow
<charlesholbrow@gmail.com>
Thu, 18 Apr 2013 18:02:08 +0000
(14:02 -0400)
committer
Charles Holbrow
<charlesholbrow@gmail.com>
Thu, 18 Apr 2013 18:02:08 +0000
(14:02 -0400)
karmaworld/apps/notes/views.py
patch
|
blob
|
history
diff --git
a/karmaworld/apps/notes/views.py
b/karmaworld/apps/notes/views.py
index 9fc83ca80980cf4ad0b9cf778624ff0f0c11a13a..d2865a2233d22e81ca6fa3d4401d67d09485cead 100644
(file)
--- a/
karmaworld/apps/notes/views.py
+++ b/
karmaworld/apps/notes/views.py
@@
-50,7
+50,8
@@
class NoteSaveView(FormView, SingleObjectMixin):
namely, saving the new data to the existing note object
"""
self.object = self.get_object()
- self.object.name = form.cleaned_data['name']
+ if len(form.cleaned_data['name']) > 0:
+ self.object.name = form.cleaned_data['name']
self.object.year = form.cleaned_data['year']
# use *arg expansion to pass tags a list of tags
self.object.tags.add(*form.cleaned_data['tags'])