67P / kredits-web

Kredits Web UI
https://kredits.kosmos.org
6 stars 2 forks source link

Remove default contributors value in propsal component #93

Closed bumi closed 5 years ago

bumi commented 5 years ago

It seems that this somehow prevents/overwrites the contributors which actually should be loaded in the controller.

Before that the contributors dropdown on the proposals new page was empty. This change seems to fix it.

galfert commented 5 years ago

I set the default to an empty array in a different way. Just to be sure nothing fails when you don't give any contributors attribute to the component.

bumi commented 5 years ago

so what is the best way to fix that it is loaded from the controller (which is some alias of kredits.contirbutors) ?

galfert commented 5 years ago

I don't understand the question. What's wrong with that? It is given as an attribute to the component here: https://github.com/67P/kredits-web/blob/3dbcba5eb2b1c70bef42e31528bc94b288595f3c/app/templates/proposals/new.hbs#L7

raucao commented 5 years ago

The component should always get a list anyway, because you cannot have a contribution without a contributor. So I think this solution is fine now.