From 2189e2f06564b3f8fb74b0cd9a9364d0488c435d Mon Sep 17 00:00:00 2001
From: Dan Jones <dan.jones@noc.ac.uk>
Date: Tue, 7 Feb 2023 11:48:04 +0000
Subject: [PATCH] fix: correct client post endpoint

---
 endpoints/clients.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/endpoints/clients.py b/endpoints/clients.py
index a079e93..74cf771 100644
--- a/endpoints/clients.py
+++ b/endpoints/clients.py
@@ -132,9 +132,9 @@ class ClientList(Resource):
         if errors: 
             abort(400, message=str(errors))
         
-        client = clients_file.find(args["client_id"])
+        client = self.clients_file.find(args["client_id"])
         if client:
             abort(403, message="Duplicate client id: {}".format(client_id))
         else:
-            client = clients_file.add(args)
+            client = self.clients_file.add(args)
         return client, 201
-- 
GitLab