helpers: allow champ without persisted dossier
This fixes the /patron page. I also added an end-to-end test to avoid breaking this page in the future.
This commit is contained in:
parent
854274cae3
commit
2b90d7cc01
2 changed files with 9 additions and 1 deletions
|
@ -28,7 +28,7 @@ module ChampHelper
|
|||
|
||||
def autosave_available?(champ)
|
||||
# FIXME: enable autosave on champs private? once we figured out how to batch audit events
|
||||
champ.dossier.brouillon? && !champ.repetition?
|
||||
champ.dossier&.brouillon? && !champ.repetition?
|
||||
end
|
||||
|
||||
def geo_area_label(geo_area)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue