Spaces:
Build error
Build error
Download tecnicas/controllers/models_controller/posicion_controller.py from chartManD/cata_system: direct link, hf CLI and curl.
- Browser
- Download file 699 Bytes
-
https://huggingface.co/spaces/chartManD/cata_system/resolve/main/tecnicas/controllers/models_controller/posicion_controller.py
- Command line
-
hf download hf://spaces/chartManD/cata_system/tecnicas/controllers/models_controller/posicion_controller.py
-
curl -L -o posicion_controller.py https://huggingface.co/spaces/chartManD/cata_system/resolve/main/tecnicas/controllers/models_controller/posicion_controller.py
699 Bytes
| from ...utils import controller_error | |
| from ...models import Orden, Posicion | |
| class PosicionController(): | |
| def getPostionsInOrder(order: Orden = None, id_order: id = None): | |
| if order is not None: | |
| positions = list(Posicion.objects.filter(id_orden=order)) | |
| if not positions: | |
| return controller_error("No existe orden") | |
| return positions | |
| if id_order is not None: | |
| positions = list(Posicion.objects.filter(id_orden_id=id_order)) | |
| if not positions: | |
| return controller_error("No existe orden") | |
| return positions | |
| return controller_error("No se define búsqueda") | |