Fix bug where it wasn't possible to save flag actions (#7188)
Display proper error when no flag is selected.