JAWD-001 / peer_mentoring

Peer Mentoring Application
0 stars 1 forks source link

Fix post <> comment relationship in models.py #13

Closed bbelderbos closed 1 year ago

bbelderbos commented 1 year ago
          but wait it seems you did it the other way around, I would expect the foreign key to go on the comment table back to post? 

so:

class Comment(models.Model):
    ... fields ...
    post = models.ForeignKey(Post, on_delete=models.CASCADE)

_Originally posted by @bbelderbos in https://github.com/JAWD-001/peer_mentoring/pull/11#discussion_r1144890612_

JAWD-001 commented 1 year ago

You're right, I made a mistake.

JAWD-001 commented 1 year ago

Fixed

bbelderbos commented 1 year ago

great work!