lunes-cms icon indicating copy to clipboard operation
lunes-cms copied to clipboard

Rename "obj" in parameter

Open MizukiTemma opened this issue 1 year ago • 0 comments

Motivation

"Obj" is often used as parameter name in Lunes. It's better and will be more self-explaining if they are renamed, for exmaple, to "document". See an exmaple below..

Proposed Solution

Rename parameters named "obj" to other names, like "document" or whatever more intuitive.

Alternatives

Additional Context

def creator_group(self, obj):
    """
    Include creator group of discipline in list display


    :param obj: Document object
    :type obj: models.Document
    :return: Either static admin group or user group
    :rtype: str
    """
    if obj.creator_is_admin:
        return Static.admin_group
    if obj.created_by:
        return obj.created_by
    return None

MizukiTemma avatar Feb 17 '24 10:02 MizukiTemma