Don't fail when no cards
This will prevent nil errors when parsing the command. Instead, the regular command validation will trigger and the error will be handled as expected.
This commit is contained in:
@@ -11,6 +11,8 @@ class Command::Parser::Context
|
||||
user.accessible_cards.where id: params[:id]
|
||||
elsif controller == "cards" && action == "index"
|
||||
filter.cards
|
||||
else
|
||||
Card.none
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user