Problem explicit on the title. Can't seem to grant an award twice. I get this:

user warning: Duplicate entry '343' for key 3 query: INSERT INTO award_grants (uid,nid,granted_by,granted_time,grant_reason) VALUES (42,343,1,1231085676,'Site Moderator') in /var/www/vhosts/blablablablasite.org/httpdocs/modules/award/award.module on line 215.

Can anyone help?

Comments

sugardave’s picture

This is indeed not working, but I wonder if it was the intent of the module creator to allow multiple issuance of the same award. Typically, I gather you would create a new award of the same type, thus keeping them distinct.

Maybe this should be a feature request to have the "awards to grant" list NOT contain awards that have already been given, and that would eliminate the duplicate entry error.

stuarteske’s picture

Hi,

It seems that the award nid and uid have been set to unique keys within the awards.install file.
To change just remove lines...

46:  'unique keys' => array(
47:    'uid' => array('uid'),
48:    'nid' => array('nid'),
49:  ),

This was required by a new christian web awards scheme.

Please send me some feedback
contact me at http://www.facebook.com/stuart.eske