Skip to content

Commit 4eaaddd

Browse files
committed
Changed nomcom.models.Nomcom() to use a FileSystemStorage which doesn't record the file system location in the migration, in order to avoid having model changes detected when switching from one development path to another.
- Legacy-Id: 10280
1 parent 2676aa7 commit 4eaaddd

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

ietf/nomcom/models.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,16 @@ class ReminderDates(models.Model):
3131
nomcom = models.ForeignKey('NomCom')
3232

3333

34+
class NoLocationMigrationFileSystemStorage(FileSystemStorage):
35+
36+
def deconstruct(obj):
37+
path, args, kwargs = FileSystemStorage.deconstruct(obj)
38+
kwargs["location"] = None
39+
return (path, args, kwargs)
40+
41+
3442
class NomCom(models.Model):
35-
public_key = models.FileField(storage=FileSystemStorage(location=settings.NOMCOM_PUBLIC_KEYS_DIR),
43+
public_key = models.FileField(storage=NoLocationMigrationFileSystemStorage(location=settings.NOMCOM_PUBLIC_KEYS_DIR),
3644
upload_to=upload_path_handler, blank=True, null=True)
3745

3846
group = models.ForeignKey(Group)

0 commit comments

Comments
 (0)