Fix incorrect constraint in error handler

This commit is contained in:
Tyler Hallada 2021-01-15 17:22:50 -05:00
parent 2f95fab825
commit 55c68fee2c

View File

@ -64,7 +64,7 @@ pub fn from_anyhow(error: anyhow::Error) -> HttpApiProblem {
.set_detail("Owner does not exist"); .set_detail("Owner does not exist");
} else if code == "23503" } else if code == "23503"
&& (constraint == "interior_ref_lists_shop_id_fkey" && (constraint == "interior_ref_lists_shop_id_fkey"
|| constraint == "merchandise_lists_owner_id_fkey" || constraint == "merchandise_lists_shop_id_fkey"
|| constraint == "transactions_shop_id_fkey") || constraint == "transactions_shop_id_fkey")
{ {
// foreign_key_violation // foreign_key_violation