From 0aee1acd29c92df779831c609e8e709370810ef5 Mon Sep 17 00:00:00 2001 From: Sergei Maertens Date: Fri, 29 Nov 2024 18:17:04 +0100 Subject: [PATCH] :coffin: Delete dead code The type checker correctly points out that the symbol doesn't exist. This code cannot have worked in its 'current' state, so it should be safe to delete. --- zgw_consumers/fields.py | 23 ----------------------- 1 file changed, 23 deletions(-) delete mode 100644 zgw_consumers/fields.py diff --git a/zgw_consumers/fields.py b/zgw_consumers/fields.py deleted file mode 100644 index 287513d..0000000 --- a/zgw_consumers/fields.py +++ /dev/null @@ -1,23 +0,0 @@ -from itertools import groupby - -from django import forms -from django.contrib.admin import widgets - -from .service import get_informatieobjecttypen - - -def get_iot_choices(): - iots = get_informatieobjecttypen() - iots = sorted(iots, key=lambda iot: (iot.catalogus.domein, iot.catalogus.rsin)) - - for catalogus, _iots in groupby(iots, key=lambda iot: iot.catalogus): - group = f"{catalogus.domein} - {catalogus.rsin}" - iot_choices = [(iot.url, iot.omschrijving) for iot in _iots] - yield (group, iot_choices) - - -class InformatieObjectTypeField(forms.ChoiceField): - widget = widgets.AdminRadioSelect - - def __init__(self, choices=get_iot_choices, *args, **kwargs): - super().__init__(choices=choices, *args, **kwargs)