コード例 #1
0
 def to_internal_value(self, license_id):
     node_license = NodeLicense.load(license_id)
     if node_license:
         return {'license_type': node_license}
     raise exceptions.NotFound('Unable to find specified license.')
コード例 #2
0
ファイル: serializers.py プロジェクト: baylee-d/osf.io
 def to_internal_value(self, license_id):
     node_license = NodeLicense.load(license_id)
     return {'license_type': node_license}
コード例 #3
0
ファイル: serializers.py プロジェクト: crcresearch/osf.io
 def to_internal_value(self, license_id):
     node_license = NodeLicense.load(license_id)
     return {'license_type': node_license}