comparison src/tools/xml_tools.py @ 1531:51dec65ec62c

core (xmlui): fixed submit_id returning None when its value is ''
author Goffi <goffi@goffi.org>
date Sat, 26 Sep 2015 18:39:05 +0200
parents 94cd4d242dc5
children e2ed8009e66e
comparison
equal deleted inserted replaced
1530:94cd4d242dc5 1531:51dec65ec62c
1146 if value is None: 1146 if value is None:
1147 try: 1147 try:
1148 top_element.removeAttribute("submit") 1148 top_element.removeAttribute("submit")
1149 except NotFoundErr: 1149 except NotFoundErr:
1150 pass 1150 pass
1151 elif value: # submit_id can be the empty string to bypass form restriction 1151 else: # submit_id can be the empty string to bypass form restriction
1152 top_element.setAttribute("submit", value) 1152 top_element.setAttribute("submit", value)
1153 1153
1154 @property 1154 @property
1155 def session_id(self): 1155 def session_id(self):
1156 top_element = self.doc.documentElement 1156 top_element = self.doc.documentElement