Get or create organisation
This commit is contained in:
parent
6ca8469455
commit
68938ba44b
|
|
@ -1,8 +1,8 @@
|
|||
# Generated by Django 4.2.13 on 2024-11-20 06:22
|
||||
|
||||
import django.db.models.deletion
|
||||
from django.conf import settings
|
||||
from django.db import migrations, models
|
||||
import django.db.models.deletion
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
|
|
|||
|
|
@ -32,8 +32,11 @@ class OrganisationSupervisorTestCase(APITestCase):
|
|||
self.course_session = create_course_session(course=self.course, title="Test VV")
|
||||
self.course_config = CourseConfiguration.objects.get(course=self.course)
|
||||
|
||||
self.mobi = Organisation.objects.get(name_de="Die Mobiliar")
|
||||
self.baloise = Organisation.objects.get(name_de="Baloise")
|
||||
self.mobi = Organisation.objects.get_or_create(name_de="Die Mobiliar",
|
||||
defaults={"organisation_id": 100, "name_de": "Die Mobiliar", })[
|
||||
0]
|
||||
self.baloise = Organisation.objects.get_or_create(name_de="Baloise",
|
||||
defaults={"organisation_id": 101, "name_de": "Baloise", })[0]
|
||||
|
||||
self.supervisor = create_user("supervisor")
|
||||
self.participant_1 = add_course_session_user(
|
||||
|
|
|
|||
Loading…
Reference in New Issue