CascadeOptions repr() doesn't report refresh-expire

Issue #2417 resolved
Former user created an issue

Patch:

--- util.orig.py        2012-02-25 07:46:36.000000000 -0500
+++ util.py     2012-02-25 07:46:55.000000000 -0500
@@ -48,11 +48,11 @@
                 raise sa_exc.ArgumentError("Invalid cascade option '%s'" % x)

     def __repr__(self):
         return "CascadeOptions(%s)" % repr(",".join(
             [for x in ['delete', 'save_update', 'merge', 'expunge',
-                         'delete_orphan', 'refresh-expire'](x)
+                         'delete_orphan', 'refresh_expire']
              if getattr(self, x, False) is True]))

 def _validator_events(desc, key, validator):
     """Runs a validation method on an attribute value to be set or appended."""

Comments (3)

  1. Mike Bayer repo owner

    ideally the attributes would be read-only as well but I'm avoiding the method overhead of @property for now.

  2. Log in to comment