Commit f218894
authored
FIX mixeval edit (#660)
When user tried to edit and save a mixed eval, the creator_id was
incorrectly updated to 0 causing the user can't access the eval.
The controller calls saveAll with 'validate' equals to 'only' to
simulate a save to perform validation. Within the cake library, it will
reset the model's default values, including the creator_id.
To avoid the creator_id reset to zero when edited, set the 'created'
date field.
Previously the 'created' field was set to current datetime whenever the
record is saved. This logic was removed recently as it incorrectly
update the field when the record is being edited.
This fix tries to set the 'created' field to the existing value when the
record is being edited.1 parent 82995da commit f218894
1 file changed
+7
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
642 | 642 | | |
643 | 643 | | |
644 | 644 | | |
| 645 | + | |
| 646 | + | |
| 647 | + | |
| 648 | + | |
| 649 | + | |
| 650 | + | |
| 651 | + | |
645 | 652 | | |
646 | 653 | | |
647 | 654 | | |
| |||
0 commit comments