Opened 13 years ago

Closed 13 years ago

#41 closed defect (fixed)

wokkel.data_form.Field's has type checking issues

Reported by: ralphm Owned by: ralphm
Priority: normal Milestone: 0.5
Component: generic Keywords:


Most of the type checking by typeCheck and subsequent toElement isn't tested, and has issues with JIDs and booleans.

Change History (7)

comment:1 Changed 13 years ago by ralphm

  • author set to ralphm
  • branch set to branches/form-typecheck-41

(In [151]) Branching to 'form-typecheck-41'

comment:2 Changed 13 years ago by ralphm

  • Keywords review added
  • Owner changed from ralphm to tofu

Please review.

comment:3 Changed 13 years ago by tofu

  • Keywords review removed
  • Owner changed from tofu to ralphm

Looks good but I do not understand why there is a try: except to check for the JID values. Why not change line 229 in to something like the following?

if not isinstance(value, JID):
    value = JID(value)

comment:4 Changed 13 years ago by ralphm

I opted to use hasattr(value, 'full') instead. Based on our out-of-band discussion, I assume this is safe to be merged now. Thanks!

comment:5 Changed 13 years ago by tofu

Yes, I do not see anything else that would prevent a merge.

comment:6 Changed 13 years ago by ralphm

  • branch changed from branches/form-typecheck-41 to branches/form-typecheck-41-2

(In [160]) Branching to 'form-typecheck-41-2'

comment:7 Changed 13 years ago by ralphm

  • Resolution set to fixed
  • Status changed from new to closed

(In [162]) Address Data Form type checking issues.

Author: ralphm. Reviewer: tofu. Fixes #41.

Note: See TracTickets for help on using tickets.