gavinwahl/django-optimistic-lock

Not seeing version field

gregpinero opened this issue · 2 comments

I change my model to look like this:

class MyModel(VersionedMixin, models.Model):
    version = VersionField()

But when I run python manage.py makemigrations, it says no changes detected.

And when I try to use the model it says "django.core.exceptions.ImproperlyConfigured: VersionedMixin models must have a VersionField"

I'm not sure what's going on here. Are you able to reproduce this in a minimal project?

Sorry, turns out a had a method named "version"! So the migration was ignoring the new field.