Chrisvann1 / Software-Engineering-Note-Taking-Application

5 stars 1 forks source link

fix: apiCalls (messed up set notation) #62

Closed augustus-thomas closed 4 months ago

augustus-thomas commented 4 months ago

Hey all,

51 screwed up apiCalls.py because of an error with my set notation. I wrote a line that said:

assert "this_string" in set("this string", "that string")

Instead of passing a list of the correct values like this:

assert "this_string" in set(["this string", "that string"])

Which threw the following error:

Traceback (most recent call last):

  File "/Software-Engineering-Note-Taking-Application/frontend.py", line 566, in <module>
    runtime(0)
  File "/Software Development/Software-Engineering-Note-Taking-Application/frontend.py", line 285, in runtime
    api_response = apiCalls.searchNotes('title', search_by, desired_response)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "t/Software-Engineering-Note-Taking-Application/apiCalls.py", line 25, in searchNotes
    if field in set('modified_date', 'created_date'):
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: set expected at most 1 argument, got 2

All fixed with one easy tweak. For time reasons I will merge this on my own!