Mixonomer/main.update_tag.py

16 lines
516 B
Python
Raw Normal View History

2020-02-03 09:44:33 +00:00
def update_tag(event, context):
import logging
logger = logging.getLogger('music')
if event.get('attributes'):
if 'username' in event['attributes'] and 'tag_id' in event['attributes']:
from music.tasks.update_tag import update_tag as do_update_tag
do_update_tag(user=event['attributes']['username'], tag=event['attributes']["tag_id"])
else:
logger.error('no parameters in event attributes')
2020-02-03 09:44:33 +00:00
else:
logger.error('no attributes in event')