The problem was that after inserting a new planet the cursor updated instead of creating new cursor, then on the swapCursor function, the old cursor (which is also the new cursor) was closed and then when we tried to read the content out of the new cursor (also the old cursor) we got an exception since the cursor was closed.
NOTE:
The real solution is to rebase this commit and squash it with the Starter_Code commit, but this action would affect all the users that using this repo, so I recommend each user to rebase this issue on it's local repo
The problem was that after inserting a new planet the cursor updated instead of creating new cursor, then on the swapCursor function, the old cursor (which is also the new cursor) was closed and then when we tried to read the content out of the new cursor (also the old cursor) we got an exception since the cursor was closed.
NOTE: The real solution is to rebase this commit and squash it with the Starter_Code commit, but this action would affect all the users that using this repo, so I recommend each user to rebase this issue on it's local repo