in backend/bms_app/restore/services.py [0:0]
def _calculate_next_possible_operations(source_db):
next_operation = []
if is_pre_restore_allowed(source_db):
next_operation.append('pre_restore')
if is_restore_allowed(source_db):
next_operation.append('restore')
if source_db.status in ROLLBACK_RESTORE_ALLOWED_STATUSES:
next_operation.append('rollback_restore')
if source_db.status in FAILOVER_ALLOWED_STATUSES:
next_operation.append('failover')
return next_operation