Mercurial > p > roundup > code
changeset 3267:9ffea8719af1
disable node creation if no properties are set
| author | Alexander Smishlajev <a1s@users.sourceforge.net> |
|---|---|
| date | Thu, 07 Apr 2005 06:28:51 +0000 |
| parents | 6fc18923f837 |
| children | a67a8a6535b8 |
| files | roundup/cgi/form_parser.py |
| diffstat | 1 files changed, 4 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/roundup/cgi/form_parser.py Thu Apr 07 06:20:11 2005 +0000 +++ b/roundup/cgi/form_parser.py Thu Apr 07 06:28:51 2005 +0000 @@ -521,7 +521,10 @@ # either have a non-empty content property or no property at all. In # the latter case, nothing will change. for (cn, id), props in all_props.items(): - if isinstance(self.db.classes[cn], hyperdb.FileClass): + if (id == '-1') and not props: + # new item (any class) with no content - ignore + del all_props[(cn, id)] + elif isinstance(self.db.classes[cn], hyperdb.FileClass): if id == '-1': if not props.get('content', ''): del all_props[(cn, id)]
