@@ -146,15 +146,16 @@ def list_records(self, zone):
146
146
"""
147
147
148
148
def get_record (self , zone_id , record_id ):
149
- record_type , name = record_id .split (":" , 1 )
150
- action = "{}/domains/{}/records/{}/{}" .format (API_BASE , zone_id , name , record_type )
149
+ zone = self .get_zone (zone_id )
150
+ rparts = self .from_default_id (zone , record_id )
151
+ action = "{}/domains/{}/records/{}/{}" .format (API_BASE , zone_id , rparts .name , rparts .type )
151
152
try :
152
153
record = self .connection .request (action = action , method = "GET" )
153
154
except ResourceNotFoundError :
154
155
raise RecordDoesNotExistError (
155
156
value = "" , driver = self .connection .driver , record_id = record_id
156
157
)
157
- return self ._to_record (record .object , self . get_zone ( zone_id ) )[0 ]
158
+ return self ._to_record (record .object , zone )[0 ]
158
159
159
160
def create_record (self , name , zone , type , data , extra = None ):
160
161
self ._validate_record (None , name , type , data , extra )
@@ -420,7 +421,7 @@ def _to_record_sub(self, data, zone, value):
420
421
priority , value = value .split ()
421
422
extra ["priority" ] = priority
422
423
return Record (
423
- id = "{}:{}" . format ( data ["rrset_type " ], data ["rrset_name " ]),
424
+ id = self . to_default_id ( zone , data ["rrset_name " ], data ["rrset_type " ]),
424
425
name = data ["rrset_name" ],
425
426
type = self ._string_to_record_type (data ["rrset_type" ]),
426
427
data = value ,
0 commit comments