MLH-Fellowship / SocioMark

A social media platform that lets you upload images and secures them by embedding a personalised hash.
https://sociomark.netlify.app
MIT License
15 stars 8 forks source link

Threshold type from config #142

Closed MyrrhDev closed 3 years ago

MyrrhDev commented 3 years ago

Bug in threshold from config i.e.: async def retrieve_post(post_id: str) -> dict: post = await posts_collection.find_one({"_id": ObjectId(post_id)}) if post and (post["report_counter"] <= int(config["THRESHOLD"])): user = await users_collection.find_one({"_id": post["user_id"]})

You need to force the "int()" on that otherwise it raises a "comparison error int and string" and does not load any posts

github-actions[bot] commented 3 years ago

Thanks for raising an issue! Let us know what went wrong and we'd love to crunch it (only if it's a bug :p)

aitikgupta commented 3 years ago

This is coming from https://github.com/MLH-Fellowship/SocioMark/pull/136

I'm assigning you for a bugfix!

aitikgupta commented 3 years ago

closed via https://github.com/MLH-Fellowship/SocioMark/pull/143