Skip to content

Commit

Permalink
fix: Expose su_status on SocietyNode and production_alert in Producti…
Browse files Browse the repository at this point in the history
…onForm (#836)

* Expose su_status on SocietyNode and production_alert in ProductionForm

* Resolve linting issue

* Freeze mypy at 1.11.2 to avoid django-stubs issue
  • Loading branch information
HappyNTH authored Oct 14, 2024
1 parent f1700f7 commit 4e6f2be
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 6 deletions.
4 changes: 2 additions & 2 deletions requirements/local.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ isort >= 5.10.1 # Import sorting
pylint >= 3.3.1 # Linting

# mypy stuff
mypy >= 1.11.2 # Type checking
django-stubs >= 5.0.2
mypy == 1.11.2 # Type checking
django-stubs >= 5.1.0
types-python-dateutil==2.9.0.20241003
types-requests==2.32.0.20240914

Expand Down
2 changes: 2 additions & 0 deletions schema.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -578,6 +578,7 @@ input ProductionMutationInput {
ageRating: Int
facebookEvent: String
contactEmail: String
productionAlert: String
contentWarnings: [ProductionWarning]
id: ID
clientMutationId: String
Expand Down Expand Up @@ -788,6 +789,7 @@ type SocietyNode implements Node {
website: String
contact: String
members: [ExtendedUserNode!]!
suStatus: Boolean!
productions(offset: Int, before: String, after: String, first: Int, last: Int, createdAt: DateTime, updatedAt: DateTime, name: String, subtitle: String, description: String, shortDescription: String, venues: [ID], society: ID, status: String, ageRating: Int, facebookEvent: String, contactEmail: String, contentWarnings: [ID], productionAlert: String, slug: String, id: ID, userHasPermission: String, start: DateTime, start_Gte: DateTime, start_Lte: DateTime, end: DateTime, end_Gte: DateTime, end_Lte: DateTime, search: String, orderBy: String): ProductionNodeConnection!
id: ID!
permissions: [String]
Expand Down
1 change: 1 addition & 0 deletions uobtheatre/productions/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ class Meta:
"age_rating",
"facebook_event",
"contact_email",
"production_alert",
)


Expand Down
12 changes: 8 additions & 4 deletions uobtheatre/societies/migrations/0007_society_su_status.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,17 @@
class Migration(migrations.Migration):

dependencies = [
('societies', '0006_alter_society_options'),
("societies", "0006_alter_society_options"),
]

operations = [
migrations.AddField(
model_name='society',
name='su_status',
field=models.BooleanField(default=True, help_text='If true, society productions are included in automated reporting.', verbose_name='SU Society'),
model_name="society",
name="su_status",
field=models.BooleanField(
default=True,
help_text="If true, society productions are included in automated reporting.",
verbose_name="SU Society",
),
),
]
1 change: 1 addition & 0 deletions uobtheatre/societies/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ class Meta:
"members",
"productions",
"permissions",
"su_status",
)


Expand Down

0 comments on commit 4e6f2be

Please sign in to comment.