removing some errors

This commit is contained in:
afeiszli
2021-08-19 17:35:14 -04:00
parent d0c2f06e60
commit cd37d7701b
3 changed files with 5 additions and 4 deletions

View File

@@ -58,7 +58,7 @@ func getAllDNS(w http.ResponseWriter, r *http.Request) {
func GetAllDNS() ([]models.DNSEntry, error) {
var dns []models.DNSEntry
networks, err := models.GetNetworks()
if err != nil {
if err != nil && !database.IsEmptyRecord(err) {
return []models.DNSEntry{}, err
}
for _, net := range networks {
@@ -139,7 +139,7 @@ func SetDNS() error {
hostfile := txeh.Hosts{}
var corefilestring string
networks, err := models.GetNetworks()
if err != nil {
if err != nil && !database.IsEmptyRecord(err){
return err
}