peewee instance matching query does not exist peewee instance matching query does not exist flask flask

peewee instance matching query does not exist


The problem is in your except block.

 except models.DoesNotExist:    return json.loads({'error' : 'that set does not exist'})

Should be:

 except models.Sets.DoesNotExist:    return json.loads({'error' : 'that set does not exist'})