Skip to content

Commit

Permalink
fix: allow to create tokens on synchronous consultations
Browse files Browse the repository at this point in the history
  • Loading branch information
darccio committed Sep 17, 2024
1 parent deef3fb commit d845797
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/interactors/create_token.rb
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def validate
self.skip_reason = :token_already_issued
elsif consultation&.closed?
self.skip_reason = :token_consultation_closed
elsif event&.closed?
elsif consultation&.asynchronous? && event&.closed?
self.skip_reason = :token_event_closed
end

Expand Down
2 changes: 1 addition & 1 deletion app/models/consultation.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ class Config
include StoreModel::Model
include TranslateStoreModel

enum :mode, %i[synchronous asynchronous], default: :asynchronous
enum :mode, %i[synchronous asynchronous], default: :synchronous
enum :ballot, %i[open secret], default: :secret
enum :distribution, %i[manual email], default: :manual
enum :alias, %i[none spanish_nid], default: :none
Expand Down

0 comments on commit d845797

Please sign in to comment.