Skip to content
This repository has been archived by the owner on Mar 15, 2018. It is now read-only.

Commit

Permalink
bail a better way
Browse files Browse the repository at this point in the history
  • Loading branch information
Andy McKay committed Jun 5, 2012
1 parent d58a383 commit 8db4ccb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion migrations/417-migrate-logs.py
Expand Up @@ -6,10 +6,10 @@ def run():
cursor.execute('select activity_log_id from log_activity_app;')
ids = [r[0] for r in cursor.fetchall()]

cursor.execute('set foreign_key_checks = 0')
if not ids:
return

cursor.execute('set foreign_key_checks = 0')
cursor.execute('insert into log_activity_mkt '
'select * from log_activity where id IN %(ids)s;',
{'ids':ids})
Expand Down

0 comments on commit 8db4ccb

Please sign in to comment.