#51 Fixed issue #49: Updated the bodhiurl responsible for the bug
Merged 8 years ago by ralph. Opened 8 years ago by devyani7.
devyani7/fedora-hubs develop  into  develop

file modified
+1
@@ -11,3 +11,4 @@ 

  datanommer.models

  psycopg2

  gunicorn

+ pytz

no initial comment

Wow! Were those the only things that needed to be changed?

@ralph i guess so, because the baseurl was redefined in the next mention. The error that was being returned is gone now though.

This shouldn't have been committed, I think (like we talked about in IRC). We want to keep that key='updates' argument in there because it hides the widget entirely when there are no 'updates'' in the result returned from data(...).

Looks like this shouldn't have been committed.

So, this technically works but is pretty fragile. nvr here isn't actually the nvr string itself, but is instead a dict that looks like {"nvr": "some string"}.

Accessing nvr.items()[0][1] is kind of odd. It works because nvr is a dict with only one key/value pair in it. But, if more information was passed in, nvr.items() would return its items in a random order... so you're not guaranteed that the [0] one will be the one you want.

The nice thing about a dict is that you access its values by name, so, we should do that. It's much more clear to the reader (and readability counts!)

I suggest reworking this starting up further in the code so that:

build = update['builds'][0]
nvr = build['nvr']
# etc...

Thanks for this @devyani7. Merging!

Metadata