From b3aa88c9b9696f30ee93825b7a865f1fbdd8bf71 Mon Sep 17 00:00:00 2001 From: Jacob Rief Date: Thu, 7 Dec 2023 09:16:57 +0100 Subject: [PATCH] Backport to Django-4.0 --- formset/collection.py | 2 +- setup.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/formset/collection.py b/formset/collection.py index 4cd3a377..7cda9ae9 100644 --- a/formset/collection.py +++ b/formset/collection.py @@ -290,7 +290,7 @@ def validate_unique(self): for valid_holders in self.valid_holders: for name, holder in valid_holders.items(): if isinstance(holder, BaseModelForm): - exclude = holder._get_validation_exclusions().difference(unique_fields) + exclude = set(holder._get_validation_exclusions()).difference(unique_fields) unique_checks, date_checks = holder.instance._get_unique_checks( exclude=exclude, include_meta_constraints=True, diff --git a/setup.py b/setup.py index 3a6d5d27..4c3ec637 100644 --- a/setup.py +++ b/setup.py @@ -19,6 +19,7 @@ 'Programming Language :: Python :: 3.9', 'Programming Language :: Python :: 3.10', 'Programming Language :: Python :: 3.11', + 'Framework :: Django :: 4.0', 'Framework :: Django :: 4.1', 'Framework :: Django :: 4.2', ] @@ -32,7 +33,7 @@ url='https://github.com/jrief/django-formset', packages=find_packages(include=['formset', 'formset.*']), install_requires=[ - 'django>=4.1', + 'django>=4.0', ], extra_requires={ 'thumbnail': ['Pillow'],