sparcs-kaist / new-ara-api

Restful API for Ara, KAIST's official community service
http://newara.sparcs.org/
MIT License
20 stars 1 forks source link

Fix article and attachment relationship to one-to-many #423

Open injoonH opened 1 year ago

injoonH commented 1 year ago

Though files and articles have one-to-many relations, the code uses many-to-many. It seems that it can be solved by just changing the field to ForeignKey, there are cases where the idempotent issue occurred, resulting in two articles with the same content being made. In these cases, attachments have multiple related articles.