Skip to content

Commit

Permalink
fix: changed safequery to normal query in resize-event-image task
Browse files Browse the repository at this point in the history
  • Loading branch information
codedsun committed Dec 9, 2019
1 parent 7856bd8 commit ae341ca
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/api/helpers/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ def send_email_task_smtp(payload, smtp_config, headers=None):

@celery.task(base=RequestContextTask, name='resize.event.images', bind=True)
def resize_event_images_task(self, event_id, original_image_url):
event = safe_query(db, Event, 'id', event_id, 'event_id')
event = Event.query.get(event_id)
try:
logging.info('Event image resizing tasks started {}'.format(original_image_url))
uploaded_images = create_save_image_sizes(original_image_url, 'event-image', event.id)
Expand Down

0 comments on commit ae341ca

Please sign in to comment.