Skip to content

Commit

Permalink
Fix missing validation function
Browse files Browse the repository at this point in the history
  • Loading branch information
cmutel committed Aug 22, 2016
1 parent 6720816 commit e6d0d82
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions ocelot/transformations/cutoff/validation.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,20 @@
get_numerical_property,
get_single_reference_product,
)
from ..validation import check_single_output_activity
from ...errors import InvalidExchange
from pprint import pformat
import wrapt


@wrapt.decorator
def valid_no_allocation_dataset(wrapped, instance, args, kwargs):
"""Check to make sure the activity has one reference product and no byproducts"""
dataset = kwargs.get('dataset') or args[0]
check_single_output_activity(dataset)
return wrapped(*args, **kwargs)


@wrapt.decorator
def valid_economic_activity(wrapped, instance, args, kwargs):
"""Check to make sure the activity meets the assumptions for economic allocation.
Expand Down

0 comments on commit e6d0d82

Please sign in to comment.