mirror of
https://github.com/grafana/grafana.git
synced 2026-07-30 00:08:10 -05:00
InfluxDB: Fix setting retention policy on visual query editor (#72248)
Prevent fetch loop
This commit is contained in:
+1
-1
@@ -55,7 +55,7 @@ export const VisualInfluxQLEditor = (props: Props): JSX.Element => {
|
||||
const { retentionPolicies } = useRetentionPolicies(datasource);
|
||||
|
||||
useEffect(() => {
|
||||
if (!policy) {
|
||||
if (!policy && retentionPolicies.length > 0) {
|
||||
props.onChange({
|
||||
...query,
|
||||
policy: retentionPolicies[0],
|
||||
|
||||
Reference in New Issue
Block a user