~evanj/cms

60e262c9f70c1106a621b861979e8e5f48fb81d0 — Evan M Jones 4 months ago 9533593
Fix(ContentType+Content transaction): Fix content iterator transaction
usage in cache/contenttype.go where cache was locking table so
contenttype failed to delete.
1 files changed, 4 insertions(+), 4 deletions(-)

M internal/s/cache/contenttype.go
M internal/s/cache/contenttype.go => internal/s/cache/contenttype.go +4 -4
@@ 105,6 105,10 @@ func (c *Cache) ContentTypeDelete(space space.Space, ct contenttype.ContentType)
		list = append(list, subList...)
	}

	if err := t.Commit(); err != nil {
		return err
	}

	var deleteErr error
	_, _ = c.contenttype(
		true,


@@ 127,10 131,6 @@ func (c *Cache) ContentTypeDelete(space space.Space, ct contenttype.ContentType)
		}
	}

	if err := t.Commit(); err != nil {
		return err
	}

	return c.mc.Delete(key)
}