Skip to content
Snippets Groups Projects
Unverified Commit 450274ac authored by Finn-Lucas Ziehe's avatar Finn-Lucas Ziehe
Browse files

Add code required by tests

parent 44604eff
No related branches found
No related tags found
1 merge request!124Feature/mysql testing
Pipeline #46927 passed with warnings
This commit is part of merge request !124. Comments created here will be created in the context of that merge request.
......@@ -20,9 +20,9 @@ class ArticlesConfig(AppConfig):
from articles.models import User, Tag # noqa: F401
# pylint: enable=unused-import
# pylint: enable=import-outside-toplevel
# if User.objects.filter(id_tag=1).count() == 0:
# user = User(id_tag=1)
# user.save()
# for tag in Tag.objects.all():
# user.favorite_tags.add(tag)
# user.save()
if User.objects.filter(id_tag=1).count() == 0:
user = User(id_tag=1)
user.save()
for tag in Tag.objects.all():
user.favorite_tags.add(tag)
user.save()
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment