Merge "Block checkpoint restore/delete when not available"
This commit is contained in:
commit
ba9460e383
|
@ -33,7 +33,7 @@ class RestoreCheckpointLink(tables.LinkAction):
|
|||
return reverse(self.url, args=(checkpoint.provider_id, checkpoint_id))
|
||||
|
||||
def allowed(self, request, checkpoint):
|
||||
return True
|
||||
return checkpoint.status == 'available'
|
||||
|
||||
|
||||
class DeleteCheckpointsAction(tables.DeleteAction):
|
||||
|
@ -50,7 +50,7 @@ class DeleteCheckpointsAction(tables.DeleteAction):
|
|||
count)
|
||||
|
||||
def allowed(self, request, checkpoint):
|
||||
return True
|
||||
return checkpoint.status == 'available'
|
||||
|
||||
def delete(self, request, obj_id):
|
||||
datum = self.table.get_object_by_id(obj_id)
|
||||
|
|
Loading…
Reference in New Issue