-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add candidate field to RTEN model #190
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# Generated by Django 3.2.21 on 2024-07-05 21:33 | ||
|
||
from django.conf import settings | ||
from django.db import migrations, models | ||
import django.db.models.deletion | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
migrations.swappable_dependency(settings.AUTH_USER_MODEL), | ||
('eox_nelp', '0009_pearsonrtenevent_appointments'), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name='pearsonrtenevent', | ||
name='candidate', | ||
field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to=settings.AUTH_USER_MODEL), | ||
), | ||
] |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,6 +10,7 @@ | |
EVENT_TYPE_CHOICES: A list of tuples representing the possible choices | ||
for an event type. Each choice represents a different type of event. | ||
""" | ||
from django.contrib.auth import get_user_model | ||
from django.db import models | ||
|
||
from eox_nelp.pearson_vue.constants import ( | ||
|
@@ -33,6 +34,7 @@ | |
(MODIFY_APPOINTMENT, "Modify Appointment"), | ||
(CANCEL_APPOINTMENT, "Cancel Appointment"), | ||
] | ||
User = get_user_model() | ||
|
||
|
||
class PearsonRTENEvent(models.Model): | ||
|
@@ -47,3 +49,4 @@ class PearsonRTENEvent(models.Model): | |
content = models.JSONField() | ||
created_at = models.DateTimeField(auto_now_add=True) | ||
event_type = models.CharField(max_length=20, choices=EVENT_TYPE_CHOICES) | ||
candidate = models.ForeignKey(User, null=True, on_delete=models.SET_NULL) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do you think we could use There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I wanted to do this as mandatory as possible since the idea is that every record has a user however we don't know if the client will send the whole data in the example format and secondly the migration process complains about previous records when the null=True field is not present, that's why I added the null field and I don't think we should include the blank field |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ideally, we'd avoid modifying clientCandidateId(product requirement?) due to its impact on product functionality and user experience. Any changes would necessitate significant code updates related to anonymous IDs.