Bug #477

Exception thrown if database is deleted and no owner is assigned

Added by George Notaras over 1 year ago. Updated over 1 year ago.

Status:NewStart date:09/18/2011
Priority:NormalDue 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)

Also available in: Atom PDF