mirror of
https://github.com/retspen/webvirtcloud
synced 2026-11-11 12:46:49 +00:00
Super-linter ran from the unpinned :latest image and, because of branches-ignore: [master], never on pull requests to master. Ruff now checks syntax errors and pyflakes rules (E9, F) on every push and PR. Fixes the existing findings: unused imports and variables, an unused duplicate import in instances/tests.py, and the star import in accounts/views.py. settings-dev.py keeps its star import of the base settings.
20 lines
674 B
Python
20 lines
674 B
Python
# Generated by Django 3.2.13 on 2022-06-30 07:17
|
|
|
|
from django.db import migrations
|
|
|
|
def update_default_settings(apps, schema_editor):
|
|
setting = apps.get_model("appsettings", "AppSettings")
|
|
db_alias = schema_editor.connection.alias
|
|
setting.objects.using(db_alias).filter(key="INSTANCE_MACHINE_DEFAULT_TYPE").update(choices="q35,x86_64,virt"),
|
|
setting.objects.using(db_alias).filter(key="INSTANCE_ARCH_DEFAULT_TYPE").update(choices="x86_64,i686,aarch64"),
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
|
|
dependencies = [
|
|
('appsettings', '0006_auto_20220630_0717'),
|
|
]
|
|
|
|
operations = [
|
|
migrations.RunPython(update_default_settings, None)
|
|
]
|