Skip to content

Commit

Permalink
fix topicenums
Browse files Browse the repository at this point in the history
  • Loading branch information
goapunk authored and m4ra committed Dec 4, 2023
1 parent 0735f13 commit e7313f9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,15 @@ lint:
$(VIRTUAL_ENV)/bin/isort --diff -c $(SOURCE_DIRS) || EXIT_STATUS=$$?; \
$(VIRTUAL_ENV)/bin/flake8 $(SOURCE_DIRS) --exclude migrations,settings || EXIT_STATUS=$$?; \
npm run lint || EXIT_STATUS=$$?; \
$(VIRTUAL_ENV)/bin/python manage.py makemigrations --dry-run --check --noinput || EXIT_STATUS=$$?; \
exit $${EXIT_STATUS}

.PHONY: lint-quick
lint-quick:
EXIT_STATUS=0; \
npm run lint-staged || EXIT_STATUS=$$?; \
$(VIRTUAL_ENV)/bin/python manage.py makemigrations --dry-run --check --noinput || EXIT_STATUS=$$?; \
exit $${EXIT_STATUS}

.PHONY: lint-python-files
lint-python-files:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# Generated by Django 4.2 on 2023-11-29 13:20

from django.db import migrations, models
from django.db import migrations
from django.conf import settings


def add_topics_to_m2m_table(apps, schema_editor):
if hasattr(settings, "A4_PROJECT_TOPICS"):
topicenum = settings.A4_PROJECT_TOPICS
topicsenum = settings.A4_PROJECT_TOPICS
project = apps.get_model("a4projects", "Project")
for project in project.objects.all():
for topic_code in project.topics:
Expand Down

0 comments on commit e7313f9

Please sign in to comment.