Return error when width or height are not set as integers (#61)
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
from api.models.external_print_product import get_cheapest_canvas_product, get_cheapest_poster_product
|
||||
from flask import Blueprint, request, jsonify
|
||||
from api.helpers import check_api_key
|
||||
from api.validators import validate_number, validate_exists
|
||||
from api.validators import ValidationError, validate_number, validate_exists
|
||||
from api.models import (
|
||||
Inquiry,
|
||||
Market,
|
||||
@@ -49,6 +49,9 @@ def wallpaper():
|
||||
designer = get_designer()
|
||||
reseller = get_reseller()
|
||||
|
||||
if width is None or height is None:
|
||||
raise ValidationError("width and height must be integers")
|
||||
|
||||
materials = Material.query.wallpapers().all()
|
||||
data = []
|
||||
for material in materials:
|
||||
|
||||
Reference in New Issue
Block a user