Skip to content

Commit

Permalink
fix camel-cased field names
Browse files Browse the repository at this point in the history
  • Loading branch information
Jake Rosenberg authored and Jake Rosenberg committed Oct 6, 2023
1 parent 04ec1f1 commit 96b577f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ class Migration(migrations.Migration):
operations = [
migrations.AddField(
model_name='broadcast',
name='jobId',
name='jobid',
field=models.CharField(blank=True, max_length=255),
),
migrations.AddField(
model_name='notification',
name='jobId',
name='jobid',
field=models.CharField(blank=True, max_length=255),
),
]
2 changes: 1 addition & 1 deletion designsafe/apps/api/notifications/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class BaseNotify(models.Model):
ERROR = RED = 'ERROR'
WARNING = ORANGE = 'WARNING'
EVENT_TYPE = 'event_type'
JOB_ID = 'jobId'
JOB_ID = 'jobid'
STATUS = 'status'
USER = USERNAME = 'user'
EXTRA = CONTENT = 'extra'
Expand Down
6 changes: 3 additions & 3 deletions designsafe/apps/workspace/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ def handle_webhook_request(job):
event_data[Notification.MESSAGE] = "Job '%s' Failed. Please try again..." % (job_name)
event_data[Notification.OPERATION] = 'job_failed'

last_notification = Notification.objects.filter(jobId=job_id).last()
last_notification = Notification.objects.filter(jobid=job_id).last()
should_notify = True

if last_notification:
Expand Down Expand Up @@ -165,7 +165,7 @@ def handle_webhook_request(job):
event_data[Notification.OPERATION] = 'job_finished'


last_notification = Notification.objects.filter(jobId=job_id).last()
last_notification = Notification.objects.filter(jobid=job_id).last()
should_notify = True

if last_notification:
Expand Down Expand Up @@ -198,7 +198,7 @@ def handle_webhook_request(job):
event_data[Notification.OPERATION] = 'job_status_update'


last_notification = Notification.objects.filter(jobId=job_id).last()
last_notification = Notification.objects.filter(jobid=job_id).last()

should_notify = True

Expand Down

0 comments on commit 96b577f

Please sign in to comment.