в SQL ?
@staticmethod
def get(title=object(), body=object(), slug=object(), is_active=object(), timestamp=object()) -> list:
posts = Post.query.all()
filter_posts = []
for post in posts:
if (type(title) is not object) and (post.title is not title):
continue
if (type(body) is not object) and (post.body is not body):
continue
if (type(slug) is not object) and (post.slug is not slug):
continue
if (type(is_active) is not object) and (post.is_active is not is_active):
continue
if (type(timestamp) is not object) and (post.timestamp is not timestamp):
continue
filter_posts.append(post)
return filter_posts
фубля
SKIP=object () def get(title=SKIP): if title is not SKIP:...
СОВСЕМ НЕ НОРМАЛЬНО
Обсуждают сегодня