Mentorship-backend: Its possible to be in two mentorship relations at the same time and it shouldn't be

Created on 4 Feb 2019  路  8Comments  路  Source: anitab-org/mentorship-backend

Describe the bug

I noticed through using the Swagger UI and testing the mobile app around, that it is possible to be in 2 mentorship relations at the same time. According to the project initial requirements, a user can only be in one mentorship relation at a time, so this should not be possible.

I don't know the solution since I did not investigate this yet...

To Reproduce

Steps to reproduce the behavior:

  1. Go to Backend Swagger UI
  2. Login with user: isabel
  3. Call GET /mentorship-relations
  4. See 2 mentorship relations with code 2 for ACCEPTED, which means ongoing relation.

Expected behavior

This should not be possible to happen.

Screenshots

swagger ui with 2 accepted relations for isabel

Additional context

This should be investigated ... For whoever is solving this issue, try to create relations for a same user and accept it from both sides, try to replicate this.

Coding Bug

All 8 comments

Please make sure that your issue follows the provided template.

Is it available!?.... Can I work on this!?

@LordGameleo Did you get yourself assigned to this issue or Are you working on Flask script one ?

I am not working on this one @CleverFool77

@isabelcosta I tried reproducing the steps

  • trying mentee in two relation
  • mentor in two relation
  • a user in two relation with role as mentee in one and mentor as another.

But the answer I got was correct. In all these steps, It denied to form a second relation as first one is already existing. And i didn't get the bug present in issue.

@CleverFool77 thank you for testing this. That's interesting 馃
Can you or anyone check the timings? Maybe the end date has already passed and the cron job did not complete the 1潞 relation.

@isabelcosta I have never used cron job scheduler before, but I'll try to explore and see.

@isabelcosta I would like to work on this issue, if it is available.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

isabelcosta picture isabelcosta  路  3Comments

mtreacy002 picture mtreacy002  路  8Comments

isabelcosta picture isabelcosta  路  7Comments

isabelcosta picture isabelcosta  路  6Comments

snitin315 picture snitin315  路  7Comments