Skip to content

Commit 68cc7bd

Browse files
authored
Merge pull request #40 from buildingSMART/IVS-287-capture-request-channel
Capture request channel (IVS-287)
2 parents abde8b8 + b6a9e8b commit 68cc7bd

File tree

3 files changed

+21
-3
lines changed

3 files changed

+21
-3
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Generated by Django 5.1.7 on 2025-07-23 21:25
2+
3+
from django.db import migrations, models
4+
5+
6+
class Migration(migrations.Migration):
7+
8+
dependencies = [
9+
('ifc_validation_models', '0015_validationrequest_channel'),
10+
]
11+
12+
operations = [
13+
migrations.AlterField(
14+
model_name='validationrequest',
15+
name='channel',
16+
field=models.CharField(choices=[('WEBUI', 'WebUi'), ('API', 'Api')], db_index=True, default='API', help_text='What channel was used to create this Validation Request.', max_length=10),
17+
),
18+
]

models.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -853,7 +853,7 @@ class Channel(models.TextChoices):
853853
channel = models.CharField(
854854
max_length=10,
855855
choices=Channel.choices,
856-
default=Channel.WEBUI,
856+
default=Channel.API,
857857
db_index=True,
858858
null=False,
859859
blank=False,

tests.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def test_created_request_has_status_pending(self):
2929
# assert
3030
self.assertEqual(request2.status, ValidationRequest.Status.PENDING)
3131

32-
def test_created_request_has_channel_webui(self):
32+
def test_created_request_has_channel_api(self):
3333

3434
# arrange
3535
ValidationModelsTestCase.set_user_context()
@@ -43,7 +43,7 @@ def test_created_request_has_channel_webui(self):
4343
request2 = ValidationRequest.objects.get(id=request.id)
4444

4545
# assert
46-
self.assertEqual(request2.channel, ValidationRequest.Channel.WEBUI)
46+
self.assertEqual(request2.channel, ValidationRequest.Channel.API)
4747

4848
def test_created_request_has_created_fields(self):
4949

0 commit comments

Comments
 (0)