from django.http import Http404
from django.shortcuts import get_object_or_404, get_list_or_404
from .utils import bubble_message


def get_object_or(klass, exception, *args, **kwargs):
    try:
        return get_object_or_404(klass, *args, **kwargs)
    except Http404 as e:
        raise bubble_message(e, exception)


def get_list_or(klass, exception, *args, **kwargs):
    try:
        return get_list_or_404(klass, *args, **kwargs)
    except Http404 as e:
        raise bubble_message(e, exception)

738f6171a89c53643c1a65deb3dc1ae6c393aa91
<mask token>

<mask token>


def get_object_or(klass, exception, *args, **kwargs):
    try:
        return get_object_or_404(klass, *args, **kwargs)
    except Http404 as e:
        raise bubble_message(e, exception)


<mask token>

<mask token>


def get_object_or(klass, exception, *args, **kwargs):
    try:
        return get_object_or_404(klass, *args, **kwargs)
    except Http404 as e:
        raise bubble_message(e, exception)


def get_list_or(klass, exception, *args, **kwargs):
    try:
        return get_list_or_404(klass, *args, **kwargs)
    except Http404 as e:
        raise bubble_message(e, exception)

from django.http import Http404
from django.shortcuts import get_object_or_404, get_list_or_404
from .utils import bubble_message


def get_object_or(klass, exception, *args, **kwargs):
    try:
        return get_object_or_404(klass, *args, **kwargs)
    except Http404 as e:
        raise bubble_message(e, exception)


def get_list_or(klass, exception, *args, **kwargs):
    try:
        return get_list_or_404(klass, *args, **kwargs)
    except Http404 as e:
        raise bubble_message(e, exception)
