OpenUnited / platform

Other
41 stars 66 forks source link

Refactoring `get_photo_url()` Methods and Associated Templates in Product and Person Models #142

Closed dogukanteber closed 11 months ago

dogukanteber commented 11 months ago

We have two get_photo_url() methods: the first one in the Product model and the second one in the Person model.

They have pretty much the same implementation. However, they shouldn't have. They return a requires_upload parameter which is not used most of the time. Additionally, the Product model's get_photo_url() method has the same default picture as the Person model's get_photo_url() method has. We need to have a different default image for the Product model's method.

The task is to refactor those methods and every template and Python file that use these methods.