              for field in meta.local_concrete_fields
              if field.name not in exclude
          }
  
      def prepare_database_save(self, field):
          if self.pk is None:
              raise ValueError(
                  "Unsaved model instance %r cannot be used in an ORM query." % self
 
</s> remove         return {
 </s> add         field_map = { </s> remove             if name == "pk":
 </s> add             if name == "pk" and opts is not None:
        if "pk" not in exclude:
            field_map["pk"] = Value(self.pk, meta.pk)
        return field_map
              for field in meta.local_concrete_fields
              if field.name not in exclude
          }
        if "pk" not in exclude:
            field_map["pk"] = Value(self.pk, meta.pk)
        return field_map
  
      def prepare_database_save(self, field):
          if self.pk is None:
              raise ValueError(
                  "Unsaved model instance %r cannot be used in an ORM query." % self
keep keep add 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/base.py