JIRA 503: fixed bug in custom.py where RelatedObject attribute was always assumed to be a list of related objects. E.g. graph.annotation is a single instace.