projects
/
pgwui_core
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
76f022d
)
Fix so initial form values are used
author
Karl O. Pinc
<kop@karlpinc.com>
Fri, 22 Jan 2021 19:00:25 +0000
(13:00 -0600)
committer
Karl O. Pinc
<kop@karlpinc.com>
Fri, 22 Jan 2021 19:00:25 +0000
(13:00 -0600)
src/pgwui_core/core.py
patch
|
blob
|
history
diff --git
a/src/pgwui_core/core.py
b/src/pgwui_core/core.py
index 32c95107a88201b068d8a0c61d9a8f7f960d4b98..3f8dd835817fe7eb0c4f08c38d074dc706b331ca 100644
(file)
--- a/
src/pgwui_core/core.py
+++ b/
src/pgwui_core/core.py
@@
-224,8
+224,12
@@
class LoadedForm(collections.abc.MutableMapping):
In this case we instantiate _form and give it some defaults
'''
- ivals = self._fc.ivals(self.uh.request.registry.settings)
- self._form = self._fc(self.uh.request.POST, ivals)
+ post = self.uh.request.POST
+ if post:
+ self._form = self._fc(formdata=post)
+ else:
+ ivals = self._fc.ivals(self.uh.request.registry.settings)
+ self._form = self._fc(obj=ivals)
def write(self, response, errors):
'''