bcgov / greenlight

A demonstration of the verifiable organization network showing a new restaurant gathering the permits necessary to open.
Apache License 2.0
34 stars 45 forks source link

fix getting the correct credential after search #233

Closed JakKowalCzyk closed 5 years ago

swcurran commented 5 years ago

@esune - please take a look.

@JakKowalCzyk - thanks for the PR.

esune commented 5 years ago

@JakKowalCzyk can you please describe how to reproduce the issue that this is going to fix, and how to reproduce it? Thanks!

JakKowalCzyk commented 5 years ago

@esune Of course. Firstly, we discovered that sometimes when we search a registered company on the Greenlight, we select one and than we want to generate the graph for it, here is what happens:

In case it matters to reproduce the case, we discovered it when we were using Greenlight configured to have only 2 bcgov modified agents - Business Relationship and Registered corporation, moreover the Business Relationship was depending on Registered corporation and it was the second step in our flow. Actually it looks like this is the reason why we experienced this problem, anyway we had to make the change in our fork to have Greenlight working properly, maybe it is not necessary to change it in official repo.

esune commented 5 years ago

Thank you @JakKowalCzyk! That makes sense, thank you for submitting the PR. I added a change to make the behaviour consistent when search results are found.