mirror of
https://gitlab.com/allianceauth/allianceauth.git
synced 2025-07-11 13:30:17 +02:00
- update string format method - remove redundant default arguments from function calls - remove unused imports - remove unicode identifier from strings, it's default in py3 (see: https://stackoverflow.com/a/4182635/12201331)
21 lines
612 B
Python
21 lines
612 B
Python
from django.db import migrations
|
|
|
|
|
|
def remove_permission(apps, schema_editor):
|
|
User = apps.get_model('auth', 'User')
|
|
ContentType = apps.get_model('contenttypes', 'ContentType')
|
|
Permission = apps.get_model('auth', 'Permission')
|
|
ct = ContentType.objects.get_for_model(User)
|
|
Permission.objects.filter(codename="view_fleetup", content_type=ct, name="view_fleetup").delete()
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
|
|
dependencies = [
|
|
('authentication', '0016_ownershiprecord'),
|
|
]
|
|
|
|
operations = [
|
|
migrations.RunPython(remove_permission, migrations.RunPython.noop)
|
|
]
|