0001-formdef-forbid-use-of-data_class-on-lightweight-form.patch
wcs/formdef.py | ||
---|---|---|
289 | 289 |
return '_wcs_%s' % self.url_name.title() |
290 | 290 | |
291 | 291 |
def data_class(self, mode=None): |
292 |
if getattr(self, 'fields', None) is Ellipsis: |
|
293 |
raise RuntimeError('accessing data from a lightweight object is not allowed') |
|
294 | ||
292 | 295 |
if not 'formdef' in sys.modules: |
293 | 296 |
sys.modules['formdef'] = sys.modules[__name__] |
294 | 297 |
if hasattr(sys.modules['formdef'], self.data_class_name): |
295 |
- |