Commit b03bbbb4 by Damien Moulard

remove auth in add shares view method

parent 76b93ae3
Pipeline #1829 passed with stage
in 1 minute 30 seconds
...@@ -395,8 +395,6 @@ def panel_get_purchases(request): ...@@ -395,8 +395,6 @@ def panel_get_purchases(request):
def add_shares_to_member(request): def add_shares_to_member(request):
res = {} res = {}
is_connected_user = CagetteUser.are_credentials_ok(request)
if is_connected_user is True:
try: try:
data = json.loads(request.body.decode()) data = json.loads(request.body.decode())
partner_id = int(data["partner_id"]) partner_id = int(data["partner_id"])
...@@ -410,9 +408,6 @@ def add_shares_to_member(request): ...@@ -410,9 +408,6 @@ def add_shares_to_member(request):
today = datetime.date.today().strftime("%Y-%m-%d") today = datetime.date.today().strftime("%Y-%m-%d")
res = m.create_capital_subscription_invoice(amount, today) res = m.create_capital_subscription_invoice(amount, today)
return JsonResponse(res, safe=False) return JsonResponse(res, safe=False)
else:
res['error'] = "Forbidden"
return JsonResponse(res, safe=False, status=403)
# # # BDM # # # # # # BDM # # #
def save_partner_info(request): def save_partner_info(request):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment