Skip to content
This repository has been archived by the owner on Mar 5, 2023. It is now read-only.

Commit

Permalink
Merge pull request #19 from oceanprotocol/defect/revert-template-changes
Browse files Browse the repository at this point in the history
defect/revert-template-changes
  • Loading branch information
ssallam authored Feb 17, 2020
2 parents abdea9e + 64cac91 commit d9f4366
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 0.3.6
current_version = 0.3.7
commit = True
tag = True

Expand Down
2 changes: 1 addition & 1 deletion ocean_utils/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__version__ = '0.3.6'
__version__ = '0.3.7'

# Copyright 2018 Ocean Protocol Foundation
# SPDX-License-Identifier: Apache-2.0
5 changes: 3 additions & 2 deletions ocean_utils/agreements/service_agreement.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def from_json(cls, service_dict):
service_dict.pop('templateId'),
_attributes['main']['name'],
_attributes['main']['creator'],
service_dict[cls.AGREEMENT_TEMPLATE]
_attributes[cls.AGREEMENT_TEMPLATE]
)

return cls(
Expand Down Expand Up @@ -86,7 +86,8 @@ def from_ddo(cls, service_type, ddo):
def as_dictionary(self):
values = Service.as_dictionary(self)
values[ServiceAgreementTemplate.TEMPLATE_ID_KEY] = self.template_id
values[ServiceAgreement.AGREEMENT_TEMPLATE] = self.service_agreement_template.template
attributes = values[ServiceAgreement.SERVICE_ATTRIBUTES]
attributes[ServiceAgreement.AGREEMENT_TEMPLATE] = self.service_agreement_template.template
return values

def init_conditions_values(self, did, contract_name_to_address):
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,6 @@
test_suite='tests',
tests_require=test_requirements,
url='https://github.com/oceanprotocol/common-utils-py',
version='0.3.6',
version='0.3.7',
zip_safe=False,
)
6 changes: 3 additions & 3 deletions tests/resources/ddo/ddo_sa_sample.json
Original file line number Diff line number Diff line change
Expand Up @@ -149,9 +149,8 @@
},
"additionalInformation": {
"description": ""
}
},
"serviceAgreementTemplate": {
},
"serviceAgreementTemplate": {
"contractName": "EscrowAccessSecretStoreTemplate",
"events": [
{
Expand Down Expand Up @@ -294,6 +293,7 @@
}
]
}
}
}
]
}
7 changes: 4 additions & 3 deletions tests/resources/ddo/ddo_sample1.json
Original file line number Diff line number Diff line change
Expand Up @@ -133,9 +133,8 @@
},
"additionalInformation": {
"description": ""
}
},
"serviceAgreementTemplate": {
},
"serviceAgreementTemplate": {
"contractName": "EscrowAccessSecretStoreTemplate",
"events": [
{
Expand Down Expand Up @@ -278,6 +277,8 @@
}
]
}
}

}
]
}
7 changes: 4 additions & 3 deletions tests/resources/ddo/ddo_sample2.json
Original file line number Diff line number Diff line change
Expand Up @@ -135,9 +135,8 @@
},
"additionalInformation": {
"description": ""
}
},
"serviceAgreementTemplate": {
},
"serviceAgreementTemplate": {
"contractName": "EscrowAccessSecretStoreTemplate",
"events": [
{
Expand Down Expand Up @@ -280,6 +279,8 @@
}
]
}
}

}
]
}

0 comments on commit d9f4366

Please sign in to comment.