Changes between Initial Version and Version 1 of Ticket #27039, comment 17
- Timestamp:
- Jun 1, 2017, 11:33:39 AM (7 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #27039, comment 17
initial v1 7 7 The model form also has a clean method that if a value isn't supplied for field_x that it will generate one: 8 8 9 {{ 9 {{{ 10 10 def clean_field_x(self): 11 11 token = self.cleaned_data.get('field_x') … … 13 13 token = utils.generate_token() 14 14 return token 15 }} 15 }}} 16 16 17 17 It would appear that in 1.10.1 it changed from using the generated token in the clean method, to then preferring the model field's default value. I think this behavior is incorrect, shouldn't it prefer the form's cleaned data over the model defaults?