Bumped the version to 7

Fixed double exception being thrown
Currency pipe broke the accounts pipe
This commit is contained in:
tanshu committed 2020-06-01 09:02:52 +05:30
1 parent 1c2c98e7b5
commit 7b4756fe1a
26 files changed
+55 -166

No files matched your search

+2 -7
View File
@@ -1,4 +1,3 @@
import traceback
import uuid
from fastapi import APIRouter, HTTPException, status, Depends, Security
@@ -46,9 +45,7 @@ def update(
)
except Exception:
db.rollback()
raise HTTPException(
status_code=status.HTTP_500_INTERNAL_SERVER_ERROR, detail=traceback.format_exc(),
)
raise
@router.delete("/{id_}")
@@ -68,9 +65,7 @@ def delete(
)
except Exception:
db.rollback()
raise HTTPException(
status_code=status.HTTP_500_INTERNAL_SERVER_ERROR, detail=traceback.format_exc(),
)
raise
@router.get("/list")
+3 -10
View File
@@ -1,4 +1,3 @@
import traceback
import uuid
from typing import List, Optional
@@ -41,9 +40,7 @@ def save(
)
except Exception:
db.rollback()
raise HTTPException(
status_code=status.HTTP_500_INTERNAL_SERVER_ERROR, detail=traceback.format_exc(),
)
raise
@router.put("/{id_}", response_model=schemas.Role)
@@ -66,9 +63,7 @@ def update(
)
except Exception:
db.rollback()
raise HTTPException(
status_code=status.HTTP_500_INTERNAL_SERVER_ERROR, detail=traceback.format_exc(),
)
raise
def add_permissions(role: Role, permissions: List[schemas.PermissionItem], db):
@@ -97,9 +92,7 @@ def delete(
)
except Exception:
db.rollback()
raise HTTPException(
status_code=status.HTTP_500_INTERNAL_SERVER_ERROR, detail=traceback.format_exc(),
)
raise
@router.get("")
+4 -13
View File
@@ -1,4 +1,3 @@
import traceback
import uuid
from typing import List, Optional
@@ -41,9 +40,7 @@ def save(
)
except Exception:
db.rollback()
raise HTTPException(
status_code=status.HTTP_500_INTERNAL_SERVER_ERROR, detail=traceback.format_exc(),
)
raise
@router.get("/me", response_model=schemas.User)
@@ -75,9 +72,7 @@ def update_me(
)
except Exception:
db.rollback()
raise HTTPException(
status_code=status.HTTP_500_INTERNAL_SERVER_ERROR, detail=traceback.format_exc(),
)
raise
@router.put("/{id_}", response_model=schemas.User)
@@ -103,9 +98,7 @@ def update(
)
except Exception:
db.rollback()
raise HTTPException(
status_code=status.HTTP_500_INTERNAL_SERVER_ERROR, detail=traceback.format_exc(),
)
raise
def add_roles(user: User, roles: List[schemas.RoleItem], db: Session):
@@ -134,9 +127,7 @@ def delete(
)
except Exception:
db.rollback()
raise HTTPException(
status_code=status.HTTP_500_INTERNAL_SERVER_ERROR, detail=traceback.format_exc(),
)
raise
@router.get("")