diff options
-rw-r--r-- | ishtar_common/views.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/ishtar_common/views.py b/ishtar_common/views.py index 6a03f1f60..18bdc6e36 100644 --- a/ishtar_common/views.py +++ b/ishtar_common/views.py @@ -996,12 +996,20 @@ def get_item(model, func_name, default_name, extra_request_keys=[], v = getattr(v, ky) if callable(v): v = v() + if hasattr(v, 'url'): + v = request.is_secure() and \ + 'https' or 'http' + '://' + \ + request.get_host() + v.url new_vals.append(v) elif val: try: val = getattr(val, ky) if callable(val): val = val() + if hasattr(val, 'url'): + val = request.is_secure() and \ + 'https' or 'http' + '://' + \ + request.get_host() + val.url new_vals.append(val) except AttributeError: # must be a query key such as "contains" |