tickets: 8459
This data as json
id | created | changetime | last_pulled_from_trac | stage | status | component | type | severity | version | resolution | summary | description | owner | reporter | keywords | easy | has_patch | needs_better_patch | needs_tests | needs_docs | ui_ux |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
8459 | 2008-08-20 22:34:19 | 2011-09-28 16:12:17 | 2022-03-06 03:42:19.951549 | Design decision needed | closed | Database layer (models, ORM) | dev | fixed | get_or_create does not pay attention to the instance calling it | get_or_create can be confusing to use because it doesn't pay attention to the object that is actually calling it. For example when calling {{{forumpost.participant_set.get_or_create(user=person)}}} it would make sense that get_or_create is referencing participant_set that is calling it and therefore would create a new entry to that result set if it doesn't exist. However, this is not the case. get_or_create merely uses participant_set to determine the type of object it is dealing with. | nobody | mymmaster | get_or_create aug22sprint | 0 | 0 | 0 | 0 | 0 | 0 |