validationError was moved to new file to avoid circular imports in the future

This commit is contained in:
Martin
2016-07-08 16:41:33 +02:00
parent 6b6121c5af
commit 23ab6588f7
3 changed files with 9 additions and 8 deletions
+1 -1
View File
@@ -2,7 +2,7 @@ from flask import Flask, jsonify, Response, request
from flask_sqlalchemy import SQLAlchemy
from api.extensions.esales import Esales
from api.helpers import check_api_key
from api.validators import ValidationError
from api.exceptions import ValidationError
db = SQLAlchemy()
esales = Esales()
+7
View File
@@ -0,0 +1,7 @@
# coding=UTF-8
class ValidationError(Exception):
def __init__(self, message):
Exception.__init__(self)
self.message = message
+1 -7
View File
@@ -1,11 +1,5 @@
# coding=UTF-8
class ValidationError(Exception):
def __init__(self, message):
Exception.__init__(self)
self.message = message
from api.exceptions import ValidationError
def validate_keys_exists(obj, *keys):