diff options
Diffstat (limited to 'ishtar_common/utils.py')
| -rw-r--r-- | ishtar_common/utils.py | 10 | 
1 files changed, 6 insertions, 4 deletions
| diff --git a/ishtar_common/utils.py b/ishtar_common/utils.py index ebfbaaa77..eb8414ced 100644 --- a/ishtar_common/utils.py +++ b/ishtar_common/utils.py @@ -1160,18 +1160,16 @@ def get_relations_for_graph(rel_model, obj_pk, above_relations=None,                  other_record = left_record              else:                  other_record = right_record - -                render_bellow = False              if get_above and get_bellow and not full and (is_bellow or                                                            is_above): -                if is_above: +                if (is_above and not inverse) or (is_bellow and inverse):                      ar, er, substyles = get_relations_for_graph(                          rel_model, other_record, above_relations,                          equal_relations, treated, styles,                          render_above=True,                          render_bellow=False                      ) -                elif is_bellow: +                else:                      ar, er, substyles = get_relations_for_graph(                          rel_model, other_record, above_relations,                          equal_relations, treated, styles, @@ -1278,6 +1276,10 @@ def generate_relation_graph(obj, highlight_current=True,      else:          suffix = "" +    if full and obj.MAIN_UP_MODEL_QUERY and getattr(obj, +                                                    obj.MAIN_UP_MODEL_QUERY): +        obj = getattr(obj, obj.MAIN_UP_MODEL_QUERY) +      with open(dot_name, "r") as dot_file:          django_file = File(dot_file)          attr = "relation_dot" + suffix | 
