diff --git a/apps/map/migrations/0069_remove_null_from_text_fields.py b/apps/map/migrations/0069_remove_null_from_text_fields.py index c628a70..99b2ae4 100644 --- a/apps/map/migrations/0069_remove_null_from_text_fields.py +++ b/apps/map/migrations/0069_remove_null_from_text_fields.py @@ -62,7 +62,7 @@ def remove_nulls(apps, schema_editor): study = apps.get_model('map', 'CaseStudy') for study in CaseStudy.objects.all(): for field in string_fields: - if study._meta.get_field(field) == None: + if getattr(study, field) == None: setattr(study, field, '') study.save()