def databaseregionmigration_view(self, request, databaseregionmigration_id):
        form = DatabaseRegionMigrationDetailForm
        database_region_migration = DatabaseRegionMigration.objects.get(
            id=databaseregionmigration_id)

        if request.method == 'POST':
            form = DatabaseRegionMigrationDetailForm(request.POST)
            if form.is_valid():
                scheduled_for = form.cleaned_data['scheduled_for']

                database_region_migration_detail = DatabaseRegionMigrationDetail(
                    database_region_migration=database_region_migration,
                    step=database_region_migration.current_step,
                    scheduled_for=scheduled_for,
                    created_by=request.user.username)

                database_region_migration_detail.save()

                task_history = TaskHistory()
                task_history.task_name = "execute_database_region_migration"
                task_history.task_status = task_history.STATUS_WAITING

                description = database_region_migration.description()
                task_history.arguments = "Database name: {},\
                                          Macro step: {}".format(database_region_migration.database.name,
                                                                 description)
                task_history.user = request.user
                task_history.save()

                is_rollback = request.GET.get('rollback')
                scheduled_for.replace(
                    tzinfo=tz.tzlocal()).astimezone(tz.tzutc())

                if is_rollback:
                    LOG.info("Rollback!")
                    database_region_migration_detail.step -= 1
                    database_region_migration_detail.save()
                    task = execute_database_region_migration_undo.apply_async(args=[database_region_migration_detail.id,
                                                                                    task_history,
                                                                                    request.user],
                                                                              eta=scheduled_for)
                else:
                    task = execute_database_region_migration.apply_async(args=[database_region_migration_detail.id,
                                                                               task_history, request.user],
                                                                         eta=scheduled_for)

                database_region_migration_detail.celery_task_id = task.task_id
                database_region_migration_detail.save()

                url = reverse('admin:notification_taskhistory_changelist')
                return HttpResponseRedirect(url + request.user.username % "?user=%s")

        return render_to_response("region_migration/databaseregionmigrationdetail/schedule_next_step.html",
                                  locals(),
                                  context_instance=RequestContext(request))
dataset/ETHPy150Open globocom/database-as-a-service/dbaas/region_migration/admin/databaseregionmigration.py/DatabaseRegionMigrationAdmin.databaseregionmigration_view/swapped operands of `%`