From eddbb37b56dcad3ad02e13064881020a8ed402c7 Mon Sep 17 00:00:00 2001 From: Aderemi Samuel Date: Sat, 19 Aug 2023 12:41:39 +0100 Subject: [PATCH] Update API_Basics.ipynb change 'is' to '==' in the delete method --- API_Basics.ipynb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/API_Basics.ipynb b/API_Basics.ipynb index 785ebe8..7abc87a 100644 --- a/API_Basics.ipynb +++ b/API_Basics.ipynb @@ -157,7 +157,7 @@ " return joke, 201\r\n", "\r\n", " def delete(self, id='c'):\r\n", - " if id is 'c':\r\n", + " if id == 'c':\r\n", " return make_response(jsonify({'error': 'ID is missing'}), 400)\r\n", " global dev_jokes\r\n", " dev_jokes = [joke for joke in dev_jokes if joke[\"id\"] != id]\r\n", @@ -464,4 +464,4 @@ "outputs": [] } ] -} \ No newline at end of file +}