Bug #477
Exception thrown if database is deleted and no owner is assigned
| Status: | New | Start date: | 09/18/2011 | |
|---|---|---|---|---|
| Priority: | Normal | Due date: | ||
| Assignee: | - | % Done: | 0% | |
| Category: | - | |||
| Target version: | - |
Description
def drop_database(sender, **kwargs):
MySQLDatabase = cache.get_model('mysql_manager', 'MySQLDatabase')
instance = kwargs['instance']
# First revoke the privileges of the user on this database
MySQLDatabase.objects.revoke_privileges(instance.name, instance.user.name)
...
# Then delete the database.
MySQLDatabase.objects.drop_database(instance.name)
Issue is caused by this line (instance.user.name does not exist):
MySQLDatabase.objects.revoke_privileges(instance.name, instance.user.name)
History
#1
Updated by George Notaras over 1 year ago
- Description updated (diff)
