8
0
Fork 0
mirror of https://gitlab2.federez.net/re2o/re2o synced 2024-11-05 01:16:27 +00:00

serializers for dns reverse, cidr is list

This commit is contained in:
Charlie Jacomme 2018-07-16 10:53:44 +02:00
parent eb3f453106
commit da2f5edb24

View file

@ -894,7 +894,7 @@ class DNSReverseZonesSerializer(serializers.ModelSerializer):
""" """
soa = SOARecordSerializer(source='extension.soa') soa = SOARecordSerializer(source='extension.soa')
extension = serializers.CharField(source='extension.name', read_only=True) extension = serializers.CharField(source='extension.name', read_only=True)
cidrs = serializers.CharField(source='ip_set_cidrs_as_str', read_only=True) cidrs = serializers.ListField(child=serializers.CharField(), source='ip_set_cidrs_as_str', read_only=True)
ns_records = NSRecordSerializer(many=True, source='extension.ns_set') ns_records = NSRecordSerializer(many=True, source='extension.ns_set')
mx_records = MXRecordSerializer(many=True, source='extension.mx_set') mx_records = MXRecordSerializer(many=True, source='extension.mx_set')
txt_records = TXTRecordSerializer(many=True, source='extension.txt_set') txt_records = TXTRecordSerializer(many=True, source='extension.txt_set')