Skip to content

Conversation

flaeppe
Copy link
Member

@flaeppe flaeppe commented Jun 6, 2024

Trying to capture the following ValueError raised by Django: https://github.com/django/django/blob/2719a7f8c161233f45d34b624a9df9392c86cc1b/django/contrib/admin/decorators.py#L59-L63

e.g.

from django.contrib.admin.decorators import display

@display(boolean=True, empty_value="empty")
def f() -> None: ...

Raises

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "django/contrib/admin/decorators.py", line 60, in decorator
    raise ValueError(
ValueError: The boolean and empty_value arguments to the @display decorator are mutually exclusive.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant