make empty descriptions on tracker edit work
it's possible to create a tracker with an empty description, but not edit a tracker to have an empty description. the rewrite lambda turns empty strings into None, resulting in descriptions being never updated if it's empty.
This commit is contained in:
parent
4c4e19a958
commit
a297b4254d
|
@ -62,9 +62,8 @@ def details_POST(owner, name):
|
|||
abort(403)
|
||||
|
||||
valid = Validation(request)
|
||||
rewrite = lambda value: None if value == "" else value
|
||||
input = {
|
||||
key: rewrite(valid.source[key]) for key in [
|
||||
key: valid.source[key] for key in [
|
||||
"description", "visibility",
|
||||
] if valid.source.get(key) is not None
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue