          """
          path, names_with_path = [], []
          for pos, name in enumerate(names):
              cur_names_with_path = (name, [])
              if name == "pk":
                  name = opts.pk.name
  
              field = None
              filtered_relation = None
              try:
 
</s> remove         return {
 </s> add         field_map = {
            if name == "pk" and opts is not None:
          """
          path, names_with_path = [], []
          for pos, name in enumerate(names):
              cur_names_with_path = (name, [])
            if name == "pk" and opts is not None:
                  name = opts.pk.name
  
              field = None
              filtered_relation = None
              try:
keep keep keep keep replace keep keep keep keep keep
 Fixed #34743 -- Fixed Meta.constraints validation crash when using pk.

Thanks Nwawel A Iroume for the report. 
django/db/models/sql/query.py