validationError was moved to new file to avoid circular imports in the future
This commit is contained in:
+1
-1
@@ -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()
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
# coding=UTF-8
|
||||
|
||||
class ValidationError(Exception):
|
||||
|
||||
def __init__(self, message):
|
||||
Exception.__init__(self)
|
||||
self.message = message
|
||||
+1
-7
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user