#NEWLINE# def has_migration_started( self ) : #NEWLINE# #INDENT# from region_migration.models import DatabaseRegionMigrationDetail #NEWLINE# try : #NEWLINE# #INDENT# migration = self . migration . get ( ) #NEWLINE# #UNINDENT# except ObjectDoesNotExist : #NEWLINE# #INDENT# return False #NEWLINE# #UNINDENT# if migration . is_migration_finished ( ) : #NEWLINE# #INDENT# return False #NEWLINE# #UNINDENT# if ( migration . current_step > 0 ) : #NEWLINE# #INDENT# return True #NEWLINE# #UNINDENT# status_to_check = [ DatabaseRegionMigrationDetail . WAITING , DatabaseRegionMigrationDetail . RUNNING ] #NEWLINE# details = migration . details . filter ( status__in = status_to_check ) #NEWLINE# if details : #NEWLINE# #INDENT# return True #NEWLINE# #UNINDENT# return False