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
This commit is contained in:
parent
2676aa7fae
commit
4eaadddf9e
|
@ -31,8 +31,16 @@ class ReminderDates(models.Model):
|
|||
nomcom = models.ForeignKey('NomCom')
|
||||
|
||||
|
||||
class NoLocationMigrationFileSystemStorage(FileSystemStorage):
|
||||
|
||||
def deconstruct(obj):
|
||||
path, args, kwargs = FileSystemStorage.deconstruct(obj)
|
||||
kwargs["location"] = None
|
||||
return (path, args, kwargs)
|
||||
|
||||
|
||||
class NomCom(models.Model):
|
||||
public_key = models.FileField(storage=FileSystemStorage(location=settings.NOMCOM_PUBLIC_KEYS_DIR),
|
||||
public_key = models.FileField(storage=NoLocationMigrationFileSystemStorage(location=settings.NOMCOM_PUBLIC_KEYS_DIR),
|
||||
upload_to=upload_path_handler, blank=True, null=True)
|
||||
|
||||
group = models.ForeignKey(Group)
|
||||
|
|
Loading…
Reference in a new issue