diff options
| author | Teddy Wing | 2018-04-30 17:08:49 +0200 |
|---|---|---|
| committer | Teddy Wing | 2018-04-30 17:08:49 +0200 |
| commit | 2fdcbb5a82c23bdaa7e23bd0b3108f404c1e44ea (patch) | |
| tree | 2559336779e57eb856a2c14a52da7a69378677a5 /app | |
| parent | 6779a070b8d5d6d738539f84e4405a86337f7dfb (diff) | |
| download | chouette-core-2fdcbb5a82c23bdaa7e23bd0b3108f404c1e44ea.tar.bz2 | |
Workbenches#show: Don't allow pending referentials to be selected6858-workbenches-show--disallow-deletion-of-pending-referent
Disable the checkboxes next to pending referentials. This prevents them
from being deleted by the batch deletion operation.
In general it seems like we shouldn't be operating on pending
referentials, so if any new batch actions are added, it would make sense
to me for the checkboxes to stay disabled.
We want to disallow deletion of pending referentials because this can
put the data in an inconsistent state that requires manual intervention
to clean (I think).
Refs #6858
Diffstat (limited to 'app')
| -rw-r--r-- | app/views/workbenches/show.html.slim | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/app/views/workbenches/show.html.slim b/app/views/workbenches/show.html.slim index b0276c5ce..213c9e5f2 100644 --- a/app/views/workbenches/show.html.slim +++ b/app/views/workbenches/show.html.slim @@ -62,7 +62,10 @@ attribute: Proc.new {|w| w.merged_at ? l(w.merged_at, format: :short) : '-'} \ ) \ ], - selectable: ->(ref){ @workbench.referentials.include?(ref) }, + selectable: ->(ref) { \ + @workbench.referentials.include?(ref) && \ + !ref.pending? \ + }, cls: 'table has-filter has-search', action: :index |
