Skip to content

Commit 7687693

Browse files
authored
fix: use json.dumps() for normalizaiton of entity_id
1 parent 0dc6b35 commit 7687693

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

google/cloud/bigquery/dataset.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
from __future__ import absolute_import
1818

1919
import copy
20+
import json
2021

2122
import typing
2223
from typing import Optional, List, Dict, Any, Union
@@ -518,7 +519,7 @@ def __eq__(self, other):
518519
def _normalize_entity_id(value):
519520
"""Ensure consistent equality for dicts like 'view'."""
520521
if isinstance(value, dict):
521-
return dict(sorted(value.items()))
522+
return json.dumps(value, sort_keys=True)
522523
return value
523524

524525
def __ne__(self, other):

0 commit comments

Comments
 (0)