Fix evaluated filters overwriting configuration
This commit is contained in:
parent
b6b8f1b8b7
commit
03ec8d3930
@ -328,10 +328,7 @@ export default {
|
||||
case compose.PageBlockCalendar.feedResources.record:
|
||||
return this.findModuleByID({ namespace: this.namespace, moduleID: feed.options.moduleID })
|
||||
.then(module => {
|
||||
const ff = {
|
||||
...feed,
|
||||
options: { ...feed.options },
|
||||
}
|
||||
const ff = compose.PageBlockCalendar.makeFeed(feed) // Clone feed, so we don't modify the original
|
||||
|
||||
// Interpolate prefilter variables
|
||||
if (ff.options.prefilter) {
|
||||
|
||||
@ -190,9 +190,8 @@ export default {
|
||||
}
|
||||
|
||||
Promise.all(this.options.feeds.filter(f => f.isValid()).map((feed, idx) => {
|
||||
return this.findModuleByID({ namespace: this.namespace, moduleID: feed.options.moduleID })
|
||||
.then(module => {
|
||||
const f = { ...feed } // Clone feed, so we dont modify the original
|
||||
return this.findModuleByID({ namespace: this.namespace, moduleID: feed.options.moduleID }).then(module => {
|
||||
const f = compose.PageBlockGeometry.makeFeed(feed) // Clone feed, so we don't modify the original
|
||||
|
||||
// Interpolate prefilter variables
|
||||
if (f.options.prefilter) {
|
||||
|
||||
@ -166,6 +166,7 @@ export default {
|
||||
if (m.moduleID) {
|
||||
// prepare a fresh metric with an evaluated prefilter
|
||||
const auxM = { ...m }
|
||||
|
||||
if (auxM.filter) {
|
||||
auxM.filter = evaluatePrefilter(auxM.filter, {
|
||||
record: this.record,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user