ninadmhatre / byteguide

Solution for hosting your HTML code docs (fork of hostthedocs)
Other
1 stars 2 forks source link

Function get_all_projects now return a dict when there are no projects, fixing broken empty browse page. #10

Closed Wesztman closed 8 months ago

Wesztman commented 8 months ago

The browse page could not be viewed when there are no projects since the get_all_projects function then return an empty list. A list has no .values() attribute which is what is used in the browse.html file. This caused UndefinedError exception to be raised.

image

Now a dict is returned when there are no projects so that the page can still be viewed empty 😊