Beispiel #1
0
    def obj2form(cls, acc):
        """
        Convert a user account object to a dictionary suitable for use with the form

        :param acc: user Account object
        :return: dictionary of form data
        """
        data = BasicUserFormXwalk.obj2form(acc)

        data["name"] = acc.name
        data["organisation"] = acc.organisation
        data["org_role"] = acc.org_role
        data["lantern_email"] = acc.lantern_email
        data["lantern_api_key"] = acc.lantern_api_key

        return data