MCPcopy Create free account
hub / github.com/Keeper-Security/Commander / CustomField

Class CustomField

keepercommander/vault.py:186–201  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

184
185
186class CustomField(object):
187 def __init__(self, custom_field=None): # type: (Optional[dict]) -> None
188 if custom_field is None:
189 custom_field = {}
190
191 self.name = sanitize_str_field_value(custom_field.get('name')).strip()
192 self.type = sanitize_str_field_value(custom_field.get('type')).strip().lower()
193 self.value = sanitize_str_field_value(custom_field.get('value')).strip()
194
195 @classmethod
196 def new_field(cls, name, value):
197 cf = CustomField()
198 cf.type = 'text'
199 cf.name = sanitize_str_field_value(name)
200 cf.value = sanitize_str_field_value(value)
201 return cf
202
203
204class AttachmentFileThumb:

Callers 2

new_fieldMethod · 0.70
load_record_dataMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected