mirror of
				https://github.com/django/django.git
				synced 2025-10-31 09:41:08 +00:00 
			
		
		
		
	Refs #30240 -- Fixed argument name for MySQLSHA2Mixin.as_mysql() and PostgreSQLSHAMixin.as_postgresql() methods.
This commit is contained in:
		| @@ -6,12 +6,12 @@ from django.db.models.lookups import Transform | |||||||
|  |  | ||||||
|  |  | ||||||
| class MySQLSHA2Mixin: | class MySQLSHA2Mixin: | ||||||
|     def as_mysql(self, compiler, connection, **extra_content): |     def as_mysql(self, compiler, connection, **extra_context): | ||||||
|         return super().as_sql( |         return super().as_sql( | ||||||
|             compiler, |             compiler, | ||||||
|             connection, |             connection, | ||||||
|             template="SHA2(%%(expressions)s, %s)" % self.function[3:], |             template="SHA2(%%(expressions)s, %s)" % self.function[3:], | ||||||
|             **extra_content, |             **extra_context, | ||||||
|         ) |         ) | ||||||
|  |  | ||||||
|  |  | ||||||
| @@ -29,13 +29,13 @@ class OracleHashMixin: | |||||||
|  |  | ||||||
|  |  | ||||||
| class PostgreSQLSHAMixin: | class PostgreSQLSHAMixin: | ||||||
|     def as_postgresql(self, compiler, connection, **extra_content): |     def as_postgresql(self, compiler, connection, **extra_context): | ||||||
|         return super().as_sql( |         return super().as_sql( | ||||||
|             compiler, |             compiler, | ||||||
|             connection, |             connection, | ||||||
|             template="ENCODE(DIGEST(%(expressions)s, '%(function)s'), 'hex')", |             template="ENCODE(DIGEST(%(expressions)s, '%(function)s'), 'hex')", | ||||||
|             function=self.function.lower(), |             function=self.function.lower(), | ||||||
|             **extra_content, |             **extra_context, | ||||||
|         ) |         ) | ||||||
|  |  | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user