_init_sce in Campaign objects was being set before the Entity constructor parsed the spend_cap_enabled property from an integer to a boolean. This was causing a failed comparison in the first case of the _migration_asst() comparison when nothing had changed, as _init_sce was a string being compared to a Boolean.
The net result being that pulling a campaign, changing some unrelated fields and then saving() was causing spend_cap_type to be removed from the POST body instead of both fields. Then Adama's API steps in when it doesn't see the new field and substitutes a default value.
This also applied to Strategies. Fixed by moving super() call up to before these fields are grabbed.
_init_sce
in Campaign objects was being set before the Entity constructor parsed thespend_cap_enabled
property from an integer to a boolean. This was causing a failed comparison in the first case of the_migration_asst()
comparison when nothing had changed, as_init_sce
was a string being compared to a Boolean.The net result being that pulling a campaign, changing some unrelated fields and then saving() was causing
spend_cap_type
to be removed from the POST body instead of both fields. Then Adama's API steps in when it doesn't see the new field and substitutes a default value.This also applied to Strategies. Fixed by moving
super()
call up to before these fields are grabbed.