Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix-bug07-phase2 #135

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open

Fix-bug07-phase2 #135

wants to merge 1 commit into from

Conversation

MonishaSivanathan
Copy link
Contributor

  • changed the constant value take_test_at to service_location
  • raised an exception while updating the master lab result

@@ -313,6 +313,11 @@ def fetch_data(table_name: str, coding: MasterModel):
def update_master_data(table_name: str, resource_id: str, data: CreateMasterModel):
if table_name not in MasterClient.table:
raise HTTPException(status_code=status.HTTP_404_NOT_FOUND, detail=f"Kindly, verify the name.")
if data.code and table_name == "lab_test":
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have you tried to update any other value with the same existing code?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

but @tamsud what they asked is if they give the cose 2nd time i have to raise exception

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For the same code if i try to update the other field what would happen

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it wont update it will raise exception tamil, can you help me what to do in this scenario

@@ -48,7 +48,7 @@ def create_master_entries(table_name: str, data: CreateMasterModel):
code_values = MasterClient.get_by_code(MasterClient.table[table_name], data.code)
code_entry = code_values.get("entry", [])
if code_entry:
raise HTTPException(status_code=status.HTTP_400_BAD_REQUEST, detail=f"Code already exists for {table_name}.")
raise HTTPException(status_code=status.HTTP_400_BAD_REQUEST, detail=f"Code already exists, Please use a unique code")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do not make this king of error again, or you copy pasting it from some other function.?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i have copied from the create function tamil

- changed the constant value take_test_at to service_location
- raised an exception while updating the master lab result
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants