Remove use of storage wrappers

Use a dynamic subclass instead that always deconstructs to a fake
subclass with a __eq__ method that always returns True. This should
trick makemigrations into never creating a new migrations for
changes to the storage class or the arguments.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
This commit is contained in:
Roberto Rosario
2018-12-29 03:45:56 -04:00
parent 442bf5dc4b
commit 000fe87c37
11 changed files with 59 additions and 35 deletions
@@ -1,9 +1,9 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.11.16 on 2018-12-28 04:22
# Generated by Django 1.11.16 on 2018-12-29 07:45
from __future__ import unicode_literals
from django.db import migrations, models
import mayan.apps.documents.storages
import mayan.apps.common.classes
import mayan.apps.documents.utils
@@ -17,6 +17,6 @@ class Migration(migrations.Migration):
migrations.AlterField(
model_name='documentversion',
name='file',
field=models.FileField(storage=mayan.apps.documents.storages.storage_documentversion_wrapper, upload_to=mayan.apps.documents.utils.document_uuid_function, verbose_name='File'),
field=models.FileField(storage=mayan.apps.common.classes.FakeStorageSubclass(), upload_to=mayan.apps.documents.utils.document_uuid_function, verbose_name='File'),
),
]