From f4e228b97ca9f18f86538117f248f3a14a79d1c9 Mon Sep 17 00:00:00 2001 From: Ilya Konstantinov Date: Thu, 11 Feb 2021 20:54:01 -0500 Subject: [PATCH] Fix error message (#907) --- pynamodb/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pynamodb/models.py b/pynamodb/models.py index 36b962956..40bcde8da 100644 --- a/pynamodb/models.py +++ b/pynamodb/models.py @@ -301,7 +301,7 @@ def __init__( """ if hash_key is not None: if self._hash_keyname is None: - raise ValueError(f"This model has no hash key, but a hash key value was provided: {range_key}") + raise ValueError(f"This model has no hash key, but a hash key value was provided: {hash_key}") attributes[self._hash_keyname] = hash_key if range_key is not None: if self._range_keyname is None: