if entry_type:
object_list = object_list.filter(type=entry_type.db)
else:
object_list = object_list.filter(type__in=[t.db for t in TYPES if t.on_main])
if category:
object_list = object_list.filter(categories=category)
if entry_type:
object_list = object_list.filter(type=entry_type.db)
else:
object_list = object_list.filter(type__in=[t.db for t in TYPES if t.on_main])
if category:
object_list = object_list.filter(categories=category)