*** menesis has quit IRC | 01:38 | |
*** menesis has joined #schooltool | 09:28 | |
*** menesis has quit IRC | 12:53 | |
*** menesis has joined #schooltool | 13:45 | |
*** ignas has joined #schooltool | 14:43 | |
*** replaceafill has joined #schooltool | 16:15 | |
replaceafill | menesis, you around? | 17:52 |
---|---|---|
menesis | replaceafill: yes | 17:59 |
* replaceafill is scratching his head... | 18:05 | |
replaceafill | somehow, the intid utility in one of the CTE instances has person objects | 18:05 |
replaceafill | which parent is **NOT** the person container! | 18:06 |
replaceafill | their __parent__ and __name__ are set to None | 18:06 |
menesis | strange | 18:13 |
menesis | what does this break? | 18:14 |
replaceafill | the group index view | 18:14 |
replaceafill | when you try to access the teachers page | 18:14 |
replaceafill | because of the relationship + catalog | 18:14 |
replaceafill | the relationship has 4 objects of this kind | 18:15 |
replaceafill | so the catalog tries to find ids for them | 18:15 |
replaceafill | it doesn't find any, so it fails | 18:15 |
menesis | of course we can write an evolution script that sets __parent__ and __name__ ... | 18:19 |
menesis | but how did that happen... | 18:20 |
replaceafill | that's the sad part :( | 18:20 |
replaceafill | i can't reproduce | 18:20 |
replaceafill | because the user doesn't know how it broke | 18:20 |
replaceafill | since you only notice it in this page | 18:21 |
*** aelkner has quit IRC | 18:22 | |
menesis | maybe those persons were deleted | 18:22 |
menesis | but somewhere a reference to person was left | 18:23 |
replaceafill | that's what i think | 18:23 |
replaceafill | but can't prove :D | 18:23 |
menesis | I would need to see exception and history of the objects in Data.fs | 18:29 |
menesis | to tell what happened to the object | 18:29 |
replaceafill | i can send you the Data.fs ;) | 18:29 |
menesis | but in any case | 18:30 |
menesis | there needs to be a check before using person.__parent__ to avoid that exception | 18:30 |
replaceafill | i added a check .queryId(item) | 18:30 |
replaceafill | and the view worked | 18:31 |
replaceafill | but it affects some other places | 18:31 |
replaceafill | like the dropdown in persons to filter by group | 18:31 |
replaceafill | shows: | 18:31 |
replaceafill | Teachers(49) | 18:31 |
replaceafill | when in reality there's only 43 valid objects | 18:31 |
*** aelkner has joined #schooltool | 18:31 | |
menesis | what would you do to make them valid? add to persons container again, or delete from intids? | 18:44 |
replaceafill | i'm calling the view to remove them from the relationship directly | 18:44 |
replaceafill | with the right parameters | 18:44 |
replaceafill | manager:7080/schoolyears/2012-2013/groups/teachers/@@members_persons.html/ajax/current_table?remove_item.artie_abrams@cteresource.org=1 | 18:45 |
replaceafill | and it's working :) | 18:45 |
replaceafill | it's not the right fix | 18:45 |
replaceafill | but at least it would make the view usable again for the user | 18:45 |
replaceafill | we need to find out about this though | 18:46 |
menesis | what can I say... never happened to me. | 18:46 |
menesis | I had broken objects in the db, had to write an evolution script to delete them | 18:46 |
menesis | the reason was that the model class was changed, so we deleted whole container | 18:47 |
menesis | but the objects that were in it somehow remained in the db | 18:47 |
menesis | with parent a Broken object | 18:48 |
menesis | but that was in philippines | 18:48 |
replaceafill | ah | 18:48 |
menesis | don't know if you changed cando model after you first deployed it | 18:48 |
replaceafill | i think we've changed cando, but this seems to affect core | 18:49 |
menesis | and I only see relationships used for nodes and layers in cando | 18:49 |
menesis | but not persons | 18:49 |
replaceafill | right | 18:49 |
menesis | so a bug in core perhaps | 18:49 |
menesis | but it's hard to guess | 18:49 |
replaceafill | definitely | 18:50 |
replaceafill | i'm suspicious about the importers for some reason | 18:50 |
replaceafill | but really don't know | 18:50 |
menesis | importer does createPerson (a person without __parent__) but if there is an error, the transaction is rolled back | 19:00 |
menesis | I don't think importer would leave bad objects | 19:01 |
*** menesis has quit IRC | 19:34 | |
*** ignas has quit IRC | 20:28 | |
*** paulproteus has quit IRC | 20:47 | |
*** paulproteus has joined #schooltool | 20:56 | |
*** menesis has joined #schooltool | 21:36 | |
*** replaceafill has quit IRC | 23:22 |
Generated by irclog2html.py 2.15.1 by Marius Gedminas - find it at mg.pov.lt!