major refactoring adding vendor and customer features
This commit is contained in:
@@ -53,7 +53,7 @@ def get_user_vendor(
|
||||
if not vendor:
|
||||
raise VendorNotFoundException(vendor_code)
|
||||
|
||||
if current_user.role != "admin" and vendor.owner_id != current_user.id:
|
||||
if current_user.role != "admin" and vendor.owner_user_id != current_user.id:
|
||||
raise UnauthorizedVendorAccessException(vendor_code, current_user.id)
|
||||
|
||||
return vendor
|
||||
|
||||
Reference in New Issue
Block a user