def _get_admin_subscription(self, subscription_id=None, pe_id=None):
        """ Get current admin subscription settings """

        s3db = current.s3db
        stable = s3db.pr_subscription
        ftable = s3db.pr_filter
        output = {}
        get_vars = {}
        if pe_id is not None and subscription_id is not None:
            query = (stable.id == subscription_id) & \
                    (stable.deleted != True) & \
                    (stable.pe_id != pe_id)
            left = ftable.on(ftable.id == stable.filter_id)
            row = current.db(query).select(stable.method,
                                           ftable.query,
                                           left=left,
                                           limitby=(0, 1)).first()

            if row:
                s = getattr(row, "pr_subscription")
                f = getattr(row, "pr_filter")

                if f.query:
                    filters = json.loads(f.query)
                    for k, v in filters:
                        if v is None:
                            continue
                        if k in get_vars:
                            if type(get_vars[k]) is list:
                                get_vars[k].append(v)
                            else:
                                get_vars[k] = [get_vars[k], v]
                        else:
                            get_vars[k] = v
                output.update({"get_vars": get_vars,
                               "method": s.method,
                               })
        else:
            # Form defaults
            output.update({"get_vars": get_vars,
                           "method": stable.method.default,
                           })

        return output

    # -------------------------------------------------------------------------
dataset/ETHPy150Open sahana/eden/modules/templates/SAMBRO/controllers.py/subscriptions._get_admin_subscription/operator `==` -> `!=`