Skip to content

Commit

Permalink
chore: rename field on TransitAgency
Browse files Browse the repository at this point in the history
to clarify it's the group of staff users, not the enrollment group
  • Loading branch information
angela-tran committed Aug 19, 2024
1 parent 27faf51 commit 5519328
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions benefits/core/migrations/0022_transitagency_group.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Generated by Django 5.0.7 on 2024-08-16 16:08
# Generated by Django 5.0.7 on 2024-08-19 14:53

import django.db.models.deletion
from django.db import migrations, models
Expand All @@ -14,7 +14,7 @@ class Migration(migrations.Migration):
operations = [
migrations.AddField(
model_name="transitagency",
name="group",
name="staff_group",
field=models.OneToOneField(
blank=True,
default=None,
Expand Down
2 changes: 1 addition & 1 deletion benefits/core/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ class TransitAgency(models.Model):
help_text="The name of the secret containing this agency's client_secret value used to access the TransitProcessor's API.", # noqa: E501
default="",
)
group = models.OneToOneField(
staff_group = models.OneToOneField(
Group,
on_delete=models.PROTECT,
null=True,
Expand Down
4 changes: 2 additions & 2 deletions tests/pytest/core/test_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -473,7 +473,7 @@ def test_TransitAgency_for_user_in_group(model_TransitAgency):

agency_for_user = TransitAgency.by_id(model_TransitAgency.id)
agency_for_user.pk = None
agency_for_user.group = group
agency_for_user.staff_group = group
agency_for_user.save()

user = User.objects.create_user(username="test_user", email="[email protected]", password="test", is_staff=True)
Expand All @@ -488,7 +488,7 @@ def test_TransitAgency_for_user_not_in_group(model_TransitAgency):

agency_for_user = TransitAgency.by_id(model_TransitAgency.id)
agency_for_user.pk = None
agency_for_user.group = group
agency_for_user.staff_group = group
agency_for_user.save()

user = User.objects.create_user(username="test_user", email="[email protected]", password="test", is_staff=True)
Expand Down

0 comments on commit 5519328

Please sign in to comment.