This commit is contained in:
Cayo Puigdefabregas 2021-08-11 13:40:37 +02:00
parent b56e9b106f
commit de727f2645
2 changed files with 4 additions and 4 deletions

View File

@ -33,6 +33,8 @@ from ereuse_devicehub.resources.documents.device_row import (DeviceRow, StockRow
from ereuse_devicehub.resources.lot import LotView
from ereuse_devicehub.resources.lot.models import Lot
from ereuse_devicehub.resources.hash_reports import insert_hash, ReportHash, verify_hash
from ereuse_devicehub.resources.documents.models import RecycleDocument
from ereuse_devicehub.resources.documents.schemas import RecycleDocument as sh_document
class Format(enum.Enum):
@ -289,9 +291,7 @@ class RecycleDocumentView(View):
"""
def post(self):
from flask import jsonify
from ereuse_devicehub.resources.documents.models import RecycleDocument
from ereuse_devicehub.resources.documents.schemas import RecycleDocument as sh_document
# import pdb; pdb.set_trace()
data = request.get_data()
schema = sh_document()
doc = schema.loads(data)

View File

@ -36,7 +36,7 @@ class DataWipeDocument(Thing):
class RecycleDocument(Thing):
__doc__ = m.DataWipeDocument.__doc__
__doc__ = m.RecycleDocument.__doc__
file_hash = SanitizedStr(data_key='hash',
default='',
description=m.RecycleDocument.file_hash.comment,