DMPbelgium / roadmap

5 stars 1 forks source link

"My dashboard" (/plans) crashes when one of your plans does not have an owner #74

Closed nicolasfranck closed 1 year ago

nicolasfranck commented 1 year ago

Please complete the following fields as applicable:

What version of the DMPRoadmap code are you running? (e.g. v2.2.0)

3.1.1

Expected behaviour:

My dashboard page should load fine

Actual behaviour:

If one of your plans does not have an owner, the page crashes.

See line https://github.com/DMPbelgium/roadmap/blob/master/app/views/branded/paginable/plans/_privately_visible.html.erb#L29

This is since we added the option to see the owner in this list. See #52

Code should actually check if plan.owner returns nil.

Secondly: what should happen when the owner leaves a plan, and there are no other coowners left?

nicolasfranck commented 1 year ago

Fix coming this way: https://github.com/DMPbelgium/roadmap/commit/ff60315f2fdf93d8ab0936bc788aaeb9ae19554d

See test server