Merge pull request #1711 from internetee/1710-deleted-domain-history-fix

fix new version fields for deleted domains
This commit is contained in:
Timo Võhmar 2020-10-14 17:01:41 +03:00 committed by GitHub
commit fff3028a8d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -57,7 +57,7 @@
- if version
- attributes = only_present_fields(version, Domain)
- domain = Domain.new(attributes)
- attach_existing_fields(version, domain)
- attach_existing_fields(version, domain) unless version.event == 'destroy'
%tr
%td= link_to(domain.name, admin_domain_version_path(version.id))

View file

@ -1,6 +1,6 @@
- present_fields = only_present_fields(@version, Domain)
- domain = Domain.new(present_fields)
- attach_existing_fields(@version, domain)
- attach_existing_fields(@version, domain) unless @version.event == 'destroy'
- if @version
- children = HashWithIndifferentAccess.new(@version.children)