kopia lustrzana https://gitlab.com/jaywink/federation
Make verify_ld_signature more robust. Make Tombstone objects signable.
rodzic
091b156703
commit
54a8404c3d
|
@ -99,6 +99,6 @@ class NormalizedDoubles(jsonld.JsonLdProcessor):
|
|||
item['@value'] = math.floor(value)
|
||||
obj = super()._object_to_rdf(item, issuer, triples, rdfDirection)
|
||||
# This is to address https://github.com/digitalbazaar/pyld/issues/175
|
||||
if obj.get('datatype') == jsonld.XSD_DOUBLE:
|
||||
if obj and obj.get('datatype') == jsonld.XSD_DOUBLE:
|
||||
obj['value'] = re.sub(r'(\d)0*E\+?(-)?0*(\d)', r'\1E\2\3', obj['value'])
|
||||
return obj
|
||||
|
|
|
@ -1205,6 +1205,7 @@ class Retraction(Announce, base.Retraction):
|
|||
|
||||
class Tombstone(Object, base.Retraction):
|
||||
target_id = fields.Id()
|
||||
signable = True
|
||||
|
||||
def to_as2(self):
|
||||
if not isinstance(self.activity, type): return None
|
||||
|
|
Ładowanie…
Reference in New Issue