On 16 January 2012 06:05, David García Granda <dgra...@gmail.com> wrote:
>
> r['sport'] value is valid and greater than 0, but the exception he got
> makes me think that sport service called wasn't able to find suitable
> references for it, not that sport id itself is not valid. So if I am
> right, Jason's workaround overcomes the launch of exception but
> prevents pytrainer to build correct statistics related to a valid
> sport.

Yes, Jason's data must contain corrupt records which reference
non-existant sports.

> I am not really familiar with sport service, but I guess correct
> approach would be to somehow create a new sport reference in it based
> on valid sport id received, otherwise future entries with same sport
> id will be skipped as well. Ideas from anyone?

It is not wise to fix the corrupt data in this way. We need to ensure
the bug that introduced the corrupt data has been eliminated and then
clean any resulting corrupt data once in an upgrade script.

This is basically the same issue discussed in the "release new
version" thread on 2011-08-31. The full fix will be done in the
activity service which I should complete in the next month. In the
mean time I think Jason's workaround is acceptable; even though the
totals will not be accurate at least it won't crash on corrupt data.

 - Nathan

------------------------------------------------------------------------------
RSA(R) Conference 2012
Mar 27 - Feb 2
Save $400 by Jan. 27
Register now!
http://p.sf.net/sfu/rsa-sfdev2dev2
_______________________________________________
Pytrainer-devel mailing list
Pytrainer-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pytrainer-devel

Reply via email to