DocCyblade / tkl-mayan-edms

Turnkey Linux - Mayan EDMS
https://www.turnkeylinux.org/mayan-edms
Other
4 stars 12 forks source link

Error on clicking Statistics #28

Closed DocCyblade closed 7 years ago

DocCyblade commented 7 years ago

When clicking on Statistics under tools you get an error.

DocCyblade commented 7 years ago

This is an upstream bug posted in this issue, on gitlab. There is also a patch statistics.patch The details are as follows:

File: /usr/share/mayan/apps/navigation/classes.py

@classmethod
    def get_for_source(cls, source):
        try:
            return cls._registry[source]
        except KeyError:
            try:
                return cls._registry[source.model]
            except AttributeError:
                try:
                    return cls._registry[source.__class__]
                except KeyError:
                    try:
                        # Special case for queryset items produced from
                        # .defer() or .only() optimizations
                        return cls._registry[source._meta.parents.items()[0][0]]
                    except (KeyError, IndexError, AttributeError):
                        return ()
        except TypeError:
            # unhashable type: list
            return ()
DocCyblade commented 7 years ago

@JedMeister - This is an upstream bug, with a patch from a community member. I haver confirmed the change in the file does fix the issue. Whats TKL stance on patching a repo? I could set the version of mayan that I fetch to 2.1.3 and then patch it. Thoughts?

JedMeister commented 7 years ago

The patch looks pretty straight forward to me. It's only changing one line. Patch files are just text files so it's pretty transparent here on GitHub.

Your suggestion is good. You could just include the patch in the overlay. /usr/local/src is probably a reasonable spot. Then apply it in the conf.

DocCyblade commented 7 years ago

This looks like it's being worked on/locked at on the upstream gitlab page now, as the maintainer has tagged it for version 2.1.4

DocCyblade commented 7 years ago

Per upstream dev, 2.1.4 should be released next week as long as no there bugs are found

DocCyblade commented 7 years ago

Looks like v2.1.4 will be released today. Will work on upgrading this version in build and close this once I confirm it's fixed

DocCyblade commented 7 years ago

Closing this, upstream has been updated and I have confirmed code builds and tests correct