diff options
| author | Barry Warsaw | 2012-03-14 02:28:13 -0400 |
|---|---|---|
| committer | Barry Warsaw | 2012-03-14 02:28:13 -0400 |
| commit | eb509dc0466f34f63ab6dcf159de2f9137cb3fdb (patch) | |
| tree | 2c6727277c034acc411cbccfcc0c50e14e53bd3c /src/mailman/rest/helpers.py | |
| parent | bcc42e2201c7172848185e5675a7b79e3d28aa0f (diff) | |
| download | mailman-eb509dc0466f34f63ab6dcf159de2f9137cb3fdb.tar.gz mailman-eb509dc0466f34f63ab6dcf159de2f9137cb3fdb.tar.zst mailman-eb509dc0466f34f63ab6dcf159de2f9137cb3fdb.zip | |
Diffstat (limited to 'src/mailman/rest/helpers.py')
| -rw-r--r-- | src/mailman/rest/helpers.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mailman/rest/helpers.py b/src/mailman/rest/helpers.py index 2ce62b0fe..2824a894e 100644 --- a/src/mailman/rest/helpers.py +++ b/src/mailman/rest/helpers.py @@ -77,10 +77,10 @@ class ExtendedEncoder(json.JSONEncoder): seconds = obj.seconds + obj.microseconds / 1000000.0 return '{0}d{1}s'.format(obj.days, seconds) return '{0}d'.format(obj.days) - elif hasattr(obj, 'enumclass') and issubclass(obj.enumclass, Enum): + elif hasattr(obj, 'enum') and issubclass(obj.enum, Enum): # It's up to the decoding validator to associate this name with # the right Enum class. - return obj.enumname + return obj.name return json.JSONEncoder.default(self, obj) |
