Changes between Initial Version and Version 2 of Ticket #275
- Timestamp:
- Aug 5, 2005, 10:40:49 AM (19 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #275
- Property Component Admin interface → Core framework
-
Ticket #275 – Description
initial v2 2 2 3 3 In method __call__ of class RequiredIfOtherFieldsGiven : 4 4 {{{ 5 5 def __call__(self, field_data, all_data): 6 6 for field in self.other: 7 7 if all_data.get(field) and not field_data: 8 8 raise ValidationError, self.error_message 9 9 }}} 10 10 looking at the __call__ method of the class RequiredIfOtherFieldNotGiven, the get() method is invoked in this way: 11 11 12 {{{ 12 13 if not all_data.get(self.other, False) and not field_data: 13 14 }}} 14 15 15 16 maybe the missed argument is just ``False``, but I'm not sure :-( … … 19 20 This is the traceback generated when you call "save" on the add poll form: 20 21 21 22 {{{ 22 23 There's been an error: 23 24 … … 37 38 38 39 TypeError: get() takes exactly 3 arguments (2 given) 39 40 }}}