Skip to content

Commit

Permalink
[#9] Provide option to avoid automatic retrieval of form choices on s…
Browse files Browse the repository at this point in the history
…tartup
  • Loading branch information
pi-sigma committed Apr 24, 2024
1 parent 4d40508 commit 6c79b55
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion openformsclient/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,8 @@ def formfield(self, **kwargs):
"widget": Select,
}

defaults["choices"] = self.get_choices(include_blank=self.blank)
if self.choices is None:
defaults["choices"] = self.get_choices(include_blank=self.blank)
defaults["coerce"] = self.to_python

return TypedChoiceField(**defaults)
Expand Down

0 comments on commit 6c79b55

Please sign in to comment.