IRC log of #schooltool for Monday, 2012-09-17

*** menesis has quit IRC01:38
*** menesis has joined #schooltool09:28
*** menesis has quit IRC12:53
*** menesis has joined #schooltool13:45
*** ignas has joined #schooltool14:43
*** replaceafill has joined #schooltool16:15
replaceafillmenesis, you around?17:52
menesisreplaceafill: yes17:59
* replaceafill is scratching his head...18:05
replaceafillsomehow, the intid utility in one of the CTE instances has person objects18:05
replaceafillwhich parent is **NOT** the person container!18:06
replaceafilltheir __parent__ and __name__ are set to None18:06
menesisstrange18:13
menesiswhat does this break?18:14
replaceafillthe group index view18:14
replaceafillwhen you try to access the teachers page18:14
replaceafillbecause of the relationship + catalog18:14
replaceafillthe relationship has 4 objects of this kind18:15
replaceafillso the catalog tries to find ids for them18:15
replaceafillit doesn't find any, so it fails18:15
menesisof course we can write an evolution script that sets __parent__ and __name__ ...18:19
menesisbut how did that happen...18:20
replaceafillthat's the sad part :(18:20
replaceafilli can't reproduce18:20
replaceafillbecause the user doesn't know how it broke18:20
replaceafillsince you only notice it in this page18:21
*** aelkner has quit IRC18:22
menesismaybe those persons were deleted18:22
menesisbut somewhere a reference to person was left18:23
replaceafillthat's what i think18:23
replaceafillbut can't prove :D18:23
menesisI would need to see exception and history of the objects in Data.fs18:29
menesisto tell what happened to the object18:29
replaceafilli can send you the Data.fs ;)18:29
menesisbut in any case18:30
menesisthere needs to be a check before using person.__parent__ to avoid that exception18:30
replaceafilli added a check .queryId(item)18:30
replaceafilland the view worked18:31
replaceafillbut it affects some other places18:31
replaceafilllike the dropdown in persons to filter by group18:31
replaceafillshows:18:31
replaceafillTeachers(49)18:31
replaceafillwhen in reality there's only 43 valid objects18:31
*** aelkner has joined #schooltool18:31
menesiswhat would you do to make them valid? add to persons container again, or delete from intids?18:44
replaceafilli'm calling the view to remove them from the relationship directly18:44
replaceafillwith the right parameters18:44
replaceafillmanager:7080/schoolyears/2012-2013/groups/teachers/@@members_persons.html/ajax/current_table?remove_item.artie_abrams@cteresource.org=118:45
replaceafilland it's working :)18:45
replaceafillit's not the right fix18:45
replaceafillbut at least it would make the view usable again for the user18:45
replaceafillwe need to find out about this though18:46
menesiswhat can I say... never happened to me.18:46
menesisI had broken objects in the db, had to write an evolution script to delete them18:46
menesisthe reason was that the model class was changed, so we deleted whole container18:47
menesisbut the objects that were in it somehow remained in the db18:47
menesiswith parent a Broken object18:48
menesisbut that was in philippines18:48
replaceafillah18:48
menesisdon't know if you changed cando model after you first deployed it18:48
replaceafilli think we've changed cando, but this seems to affect core18:49
menesisand I only see relationships used for nodes and layers in cando18:49
menesisbut not persons18:49
replaceafillright18:49
menesisso a bug in core perhaps18:49
menesisbut it's hard to guess18:49
replaceafilldefinitely18:50
replaceafilli'm suspicious about the importers for some reason18:50
replaceafillbut really don't know18:50
menesisimporter does createPerson (a person without __parent__) but if there is an error, the transaction is rolled back19:00
menesisI don't think importer would leave bad objects19:01
*** menesis has quit IRC19:34
*** ignas has quit IRC20:28
*** paulproteus has quit IRC20:47
*** paulproteus has joined #schooltool20:56
*** menesis has joined #schooltool21:36
*** replaceafill has quit IRC23:22

Generated by irclog2html.py 2.15.1 by Marius Gedminas - find it at mg.pov.lt!