Compare commits

...

2 Commits

Author SHA1 Message Date
Lauréline Guérin 537864abd8 toulouse_axel: fix xml validation to work with xmlschema 1.0.18 (#38708)
gitea-wip/passerelle/pipeline/head There was a failure building this commit Details
gitea/passerelle/pipeline/head Something is wrong with the build of this commit Details
2020-01-10 11:11:04 +01:00
Serghei Mihai e1e9472304 base: hide tokens from connector description (#38875) 2020-01-10 11:03:38 +01:00
2 changed files with 5 additions and 2 deletions

View File

@ -215,7 +215,7 @@ class BaseResource(models.Model):
def get_description_fields(self):
fields = []
for field in self._meta.fields:
if (field.name.endswith(('key', 'password', 'secret', 'keystore')) or
if (field.name.endswith(('key', 'password', 'secret', 'keystore', 'token')) or
field.name in ('id', 'title', 'slug', 'description',
'log_level', 'users', 'client_certificate')):
continue

View File

@ -192,7 +192,10 @@ class Operation(object):
def __call__(self, resource, request_data):
client = resource.soap_client()
serialized_request = self.request_converter.encode(request_data)
try:
serialized_request = self.request_converter.encode(request_data)
except xmlschema.XMLSchemaValidationError as e:
raise AxelError('invalid request %s' % str(e))
indent(serialized_request)
serialized_request = ET.tostring(serialized_request)
try: