You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently when the user visits the referral link, a ReferralResponse entry is created. However if the user opens the same referral link multiple times, this creates multiple entries containing the same data.
I think it would be better to use ReferralResponse.objects.get_or_create(**kwargs) instead of ReferralResponse.objects.create(**kwargs) in the respond method of Referral model
The text was updated successfully, but these errors were encountered:
Some developers might find multiple referrals useful. Instead, there should be an option to make a single record of multiple visits to the same referral. Given that the option can be set to record every visit to the referral code, the ReferralResponse model should provide a convenience function to de-dup the responses.
Currently when the user visits the referral link, a ReferralResponse entry is created. However if the user opens the same referral link multiple times, this creates multiple entries containing the same data.
I think it would be better to use
ReferralResponse.objects.get_or_create(**kwargs)
instead ofReferralResponse.objects.create(**kwargs)
in therespond
method ofReferral
modelThe text was updated successfully, but these errors were encountered: