Skip to content

Commit

Permalink
Town6: Make empty selection for inline photoalbum possible.
Browse files Browse the repository at this point in the history
The `ChoosenSelectField`, which was used previously, does not seem to render an empty choice.

TYPE: Bugfix
LINK: OGC-1933
  • Loading branch information
cyrillkuettel authored Nov 27, 2024
1 parent 7327673 commit d3b6bb4
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/onegov/org/models/extensions.py
Original file line number Diff line number Diff line change
Expand Up @@ -1162,12 +1162,11 @@ class PhotoAlbumForm(form_class): # type:ignore
choices = [('', '')] + [
(album.id, album.title) for album in albums
]
photo_album_id = ChosenSelectField(
photo_album_id = SelectField(
label=_('Photo album'),
fieldset=_('Photo album'),
choices=choices,
name='photo_album_id',
# default='' # By default don't show any album
)

def process_obj(self, obj: 'InlinePhotoAlbumExtension') -> None:
Expand Down

0 comments on commit d3b6bb4

Please sign in to comment.