django-constance icon indicating copy to clipboard operation
django-constance copied to clipboard

Changing value type (for example int -> datetime.timedelta) does not invalidate value, stored in database

Open PeterBeklemishev opened this issue 6 years ago • 1 comments

Describe the problem

Changing value type (for example int -> datetime.timedelta) does not invalidate value, stored in database

Steps to reproduce

  • Create constance_config entry with int value
  • Modify value via admin interface
  • Change default value in config to datetime.timedelta instance
  • Try to get this value via costance.<OUR_KEY_NAME> - it will return int instead of timedelta

System configuration

  • Django version: 2.0.x
  • Python version: 3.5

PeterBeklemishev avatar Jun 04 '18 11:06 PeterBeklemishev

Django datamigrations for next version of project solve this issues. There is no robust way to migrate data between different types automatically.

sergei-iurchenko avatar Jun 16 '22 19:06 sergei-iurchenko