Skip to content

Commit

Permalink
Merge pull request #360 from spacediver/master
Browse files Browse the repository at this point in the history
Let register decorator return decorated class
  • Loading branch information
zlorf committed Feb 4, 2016
2 parents 276ee5b + 3f4d48d commit c2465c3
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions modeltranslation/decorators.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,6 @@ def wrapper(opts_class):
if not issubclass(opts_class, TranslationOptions):
raise ValueError('Wrapped class must subclass TranslationOptions.')
translator.register(model_or_iterable, opts_class, **options)
return opts_class

return wrapper

0 comments on commit c2465c3

Please sign in to comment.