Merge branch 'hotfix/rm-cache' into mvp_deliverynote
This commit is contained in:
commit
525614ac26
|
@ -92,7 +92,7 @@ class DeviceView(View):
|
||||||
description: The device or devices.
|
description: The device or devices.
|
||||||
"""
|
"""
|
||||||
return super().get(id)
|
return super().get(id)
|
||||||
|
|
||||||
def patch(self, id):
|
def patch(self, id):
|
||||||
dev = Device.query.filter_by(id=id).one()
|
dev = Device.query.filter_by(id=id).one()
|
||||||
if isinstance(dev, Computer):
|
if isinstance(dev, Computer):
|
||||||
|
@ -109,7 +109,7 @@ class DeviceView(View):
|
||||||
db.session.commit()
|
db.session.commit()
|
||||||
return Response(status=204)
|
return Response(status=204)
|
||||||
raise ValueError('Cannot patch a non computer')
|
raise ValueError('Cannot patch a non computer')
|
||||||
|
|
||||||
def one(self, id: int):
|
def one(self, id: int):
|
||||||
"""Gets one device."""
|
"""Gets one device."""
|
||||||
if not request.authorization:
|
if not request.authorization:
|
||||||
|
@ -127,7 +127,7 @@ class DeviceView(View):
|
||||||
return self.schema.jsonify(device)
|
return self.schema.jsonify(device)
|
||||||
|
|
||||||
@auth.Auth.requires_auth
|
@auth.Auth.requires_auth
|
||||||
@cache(datetime.timedelta(minutes=1))
|
# @cache(datetime.timedelta(minutes=1))
|
||||||
def find(self, args: dict):
|
def find(self, args: dict):
|
||||||
"""Gets many devices."""
|
"""Gets many devices."""
|
||||||
# Compute query
|
# Compute query
|
||||||
|
|
|
@ -59,7 +59,7 @@ class LotView(View):
|
||||||
lot = Lot.query.filter_by(id=id).one() # type: Lot
|
lot = Lot.query.filter_by(id=id).one() # type: Lot
|
||||||
return self.schema.jsonify(lot, nested=2)
|
return self.schema.jsonify(lot, nested=2)
|
||||||
|
|
||||||
@teal.cache.cache(datetime.timedelta(minutes=5))
|
# @teal.cache.cache(datetime.timedelta(minutes=5))
|
||||||
def find(self, args: dict):
|
def find(self, args: dict):
|
||||||
"""Gets lots.
|
"""Gets lots.
|
||||||
|
|
||||||
|
|
Reference in New Issue