Skip to content

Calling Model.full_clean throws TypeError #7

Description

@xuhcc

Calling full_clean on a model containing VersionField causes an error:

  File "venv/lib/python3.6/site-packages/django/db/models/base.py", line 1227, in full_clean
    self.clean_fields(exclude=exclude)
  File "venv/lib/python3.6/site-packages/django/db/models/base.py", line 1269, in clean_fields
    setattr(self, f.attname, f.clean(raw_value, self))
  File "venv/lib/python3.6/site-packages/django/db/models/fields/__init__.py", line 607, in clean
    self.run_validators(value)
  File "venv/lib/python3.6/site-packages/django/db/models/fields/__init__.py", line 559, in run_validators
    v(value)
  File "venv/lib/python3.6/site-packages/django/core/validators.py", line 325, in __call__
    if self.compare(cleaned, self.limit_value):
  File "venv/lib/python3.6/site-packages/django/core/validators.py", line 358, in compare
    return a < b
TypeError: '<' not supported between instances of 'Version' and 'int'

Packages:

  • django v1.11.5
  • django-versionfield3 v0.1.6

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions